mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 01:18:30 +09:00
noctalia patch
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user