Skip to content

Commit

Permalink
Update miriway to version 24.11 / rev 2 via SR 1247725
Browse files Browse the repository at this point in the history
  • Loading branch information
sfalken authored and bmwiedemann committed Feb 21, 2025
1 parent f4d7799 commit ed80c34
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
Binary file modified packages/m/miriway/.files
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/m/miriway/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@
Provides the miriway wayland compositor</comment>
<requestid>1238107</requestid>
</revision>
<revision rev="2" vrev="2">
<srcmd5>5e0d7c597b98deb955394ce871791fc5</srcmd5>
<version>24.11</version>
<time>1740171683</time>
<user>dimstar_suse</user>
<comment></comment>
<requestid>1247725</requestid>
</revision>
</revisionlist>
61 changes: 61 additions & 0 deletions packages/m/miriway/0002-add-decoration-variable.patch
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()
});
}

6 changes: 6 additions & 0 deletions packages/m/miriway/miriway.changes
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]>

Expand Down
2 changes: 2 additions & 0 deletions packages/m/miriway/miriway.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed80c34

Please sign in to comment.