forked from Shinonome/dots-hyprland
use shared focusgrab for most stuff (makes osk usable w/ other panels)
This commit is contained in:
@@ -54,13 +54,16 @@ Scope { // Scope
|
||||
item: cheatsheetBackground
|
||||
}
|
||||
|
||||
HyprlandFocusGrab { // Click outside to close
|
||||
id: grab
|
||||
windows: [cheatsheetRoot]
|
||||
active: cheatsheetRoot.visible
|
||||
onCleared: () => {
|
||||
if (!active)
|
||||
cheatsheetRoot.hide();
|
||||
Component.onCompleted: {
|
||||
GlobalFocusGrab.addDismissable(cheatsheetRoot);
|
||||
}
|
||||
Component.onDestruction: {
|
||||
GlobalFocusGrab.removeDismissable(cheatsheetRoot);
|
||||
}
|
||||
Connections {
|
||||
target: GlobalFocusGrab
|
||||
function onDismissed() {
|
||||
cheatsheetRoot.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user