-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update miriway to version 24.11 / rev 2 via SR 1247725
https://build.opensuse.org/request/show/1247725 by user sfalken + dimstar_suse
- Loading branch information
1 parent
f4d7799
commit ed80c34
Showing
5 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
From 6341a5d1b76fed53e444579f421cde181207ad4e Mon Sep 17 00:00:00 2001 | ||
From: Alan Griffiths <[email protected]> | ||
Date: Thu, 20 Feb 2025 15:52:33 +0000 | ||
Subject: [PATCH] Add MIRIWAY_DECORATIONS environment variable to customise the | ||
decoration strategy | ||
|
||
--- | ||
miriway.cpp | 19 ++++++++++++++++++- | ||
1 file changed, 18 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/miriway.cpp b/miriway.cpp | ||
index 6428bfb..533e784 100644 | ||
--- a/miriway.cpp | ||
+++ b/miriway.cpp | ||
@@ -24,6 +24,7 @@ | ||
#include <mir/log.h> | ||
#include <miral/append_event_filter.h> | ||
#include <miral/configuration_option.h> | ||
+#include <miral/decorations.h> | ||
#include <miral/display_configuration_option.h> | ||
#include <miral/external_client.h> | ||
#include <miral/idle_listener.h> | ||
@@ -36,6 +37,7 @@ | ||
#include <miral/wayland_extensions.h> | ||
#include <miral/x11_support.h> | ||
|
||
+#include <cstring> | ||
#include <filesystem> | ||
#include <fstream> | ||
#include <functional> | ||
@@ -204,6 +206,20 @@ inline auto config_path(std::filesystem::path path) | ||
|
||
return miriway_shell ? std::filesystem::path(miriway_shell) / basename : basename; | ||
} | ||
+ | ||
+auto getenv_decorations() | ||
+{ | ||
+ if (auto const strategy = getenv("MIRIWAY_DECORATIONS")) | ||
+ { | ||
+ if (strcmp(strategy, "always-ssd") == 0) return Decorations::always_ssd(); | ||
+ if (strcmp(strategy, "prefer-ssd") == 0) return Decorations::prefer_ssd(); | ||
+ if (strcmp(strategy, "always-csd") == 0) return Decorations::always_csd(); | ||
+ if (strcmp(strategy, "prefer-csd") == 0) return Decorations::prefer_csd(); | ||
+ | ||
+ mir::log_warning("Unknown decoration strategy: '%s', using prefer-csd", strategy); | ||
+ } | ||
+ return Decorations::prefer_csd(); | ||
+} | ||
} | ||
|
||
int main(int argc, char const* argv[]) | ||
@@ -357,6 +373,7 @@ int main(int argc, char const* argv[]) | ||
[&] { is_locked = true; }, | ||
[&] { is_locked = false; }), | ||
set_window_management_policy<WindowManagerPolicy>(commands), | ||
- lockscreen | ||
+ lockscreen, | ||
+ getenv_decorations() | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
------------------------------------------------------------------- | ||
Thu Feb 20 17:52:54 UTC 2025 - Shawn Dunn <[email protected]> | ||
|
||
- Add: | ||
- 0002-add-decoration-variable.patch (gh#Miriway/Miriway#150) | ||
|
||
------------------------------------------------------------------- | ||
Wed Dec 4 20:15:26 UTC 2024 - Shawn Dunn <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ URL: https://github.com/Miriway/Miriway | |
Source: https://github.com/%{_name}/%{_name}/archive/v%{version}/%{_name}-%{version}.tar.gz | ||
# PATCH-FIX-OPENSUSE 0001-Fix-xkbcommon-includes.patch | ||
Patch0: 0001-Fix-xkbcommon-includes.patch | ||
# PATCH-FIX-UPSTREAM 0002-add-decoration-variable.patch [email protected] (gh#canonica/mir#3761) | ||
Patch1: 0002-add-decoration-variable.patch | ||
BuildRequires: cmake | ||
BuildRequires: gcc-c++ | ||
BuildRequires: git-core | ||
|