forked from Shinonome/dots-hyprland
Force focus workaround
This commit is contained in:
@@ -52,9 +52,17 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hasActive(element) {
|
||||||
|
return element.activeFocus || Array.from(
|
||||||
|
element.children
|
||||||
|
).some(
|
||||||
|
(child) => hasActive(child)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
id: grab
|
id: grab
|
||||||
windows: [...root.persistent, ...root.dismissable]
|
windows: root.dismissable.some(w => hasActive(w.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable]
|
||||||
active: root.dismissable.length > 0
|
active: root.dismissable.length > 0
|
||||||
onCleared: () => {
|
onCleared: () => {
|
||||||
root.dismiss();
|
root.dismiss();
|
||||||
|
|||||||
Reference in New Issue
Block a user