noctalia patch

This commit is contained in:
2026-08-05 00:40:02 +09:00
parent 96ce4d768c
commit 991dde5305
3 changed files with 61 additions and 24 deletions
+11
View File
@@ -1,6 +1,7 @@
{
lib,
pkgs,
inputs,
...
}:
let
@@ -12,6 +13,14 @@ let
--replace-fail "@codexbarPath@" "${lib.getExe codexbar}"
'';
noctaliaPatched =
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs
(oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ [
./patches/window-switcher-labwc.patch
];
});
wallpapers = pkgs.fetchFromGitHub {
owner = "moons-14";
repo = "wallpapers";
@@ -41,6 +50,8 @@ in
programs.noctalia = {
enable = true;
package = noctaliaPatched;
systemd.enable = true;
settings = {
@@ -0,0 +1,26 @@
diff --git a/src/shell/switcher/window_switcher.cpp b/src/shell/switcher/window_switcher.cpp
--- a/src/shell/switcher/window_switcher.cpp
+++ b/src/shell/switcher/window_switcher.cpp
@@ -286,12 +286,19 @@ indexLiveToplevelsByWindowId(const CompositorPlatform& platform, std::unordered_
continue;
}
- const auto mappedId = platform.compositorWindowIdForToplevelInfo(info);
- if (!mappedId.has_value() || mappedId->empty()) {
- continue;
+ std::string key;
+ if (const auto mappedId = platform.compositorWindowIdForToplevelInfo(info);
+ mappedId.has_value() && !mappedId->empty()) {
+ key = canonicalWindowId(*mappedId);
}
- const std::string key = canonicalWindowId(*mappedId);
+
+ // Generic wlroots compositors such as labwc do not provide a
+ // compositor-specific window ID. The wlr toplevel handle is stable
+ // for the lifetime of the window and is sufficient for switcher identity.
+ if (key.empty() && wlrHandle != 0) {
+ key = "toplevel:" + std::to_string(wlrHandle);
+ }
if (key.empty()) {
continue;
}