forked from Shinonome/dots-hyprland
overlay: add delay to focus grab
This commit is contained in:
@@ -46,10 +46,24 @@ Scope {
|
|||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
id: grab
|
id: grab
|
||||||
windows: [overlayWindow]
|
windows: [overlayWindow]
|
||||||
active: GlobalStates.overlayOpen
|
active: false
|
||||||
onCleared: () => {
|
onCleared: () => {
|
||||||
if (!active)
|
if (!active) GlobalStates.overlayOpen = false;
|
||||||
GlobalStates.overlayOpen = false;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: GlobalStates
|
||||||
|
function onOverlayOpenChanged() {
|
||||||
|
delayedGrabTimer.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: delayedGrabTimer
|
||||||
|
interval: Appearance.animation.elementMoveFast.duration
|
||||||
|
onTriggered: {
|
||||||
|
grab.active = GlobalStates.overlayOpen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user