1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 14:38:30 -04:00

hyprland: workaround for focus re-grabbing a closing surface

related #2577
This commit is contained in:
bbedward
2026-07-06 11:45:38 -04:00
parent 35613ebba8
commit c175f4823a
4 changed files with 49 additions and 23 deletions
+2 -6
View File
@@ -1,5 +1,4 @@
import QtQuick
import Quickshell.Hyprland
import qs.Common
import qs.Services
@@ -62,7 +61,7 @@ Item {
}
// Hyprland OnDemand grab: whitelist popout surfaces and bars so dismiss clicks still land.
HyprlandFocusGrab {
DankFocusGrab {
windows: {
const list = [];
if (root.contentWindow)
@@ -72,10 +71,7 @@ Item {
const transientWindows = root.transientSurfaceTracker?.focusWindows ?? [];
return list.concat(transientWindows).concat(KeyboardFocus.barWindows);
}
active: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus)
property var restoreToplevel: null
onActiveChanged: restoreToplevel = active ? KeyboardFocus.captureActiveToplevel() : KeyboardFocus.restoreToplevel(restoreToplevel)
wanted: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus)
}
Loader {