forked from Shinonome/dots-hyprland
no more hacky focus grab thanks to hyprland's dfb841c303263208c2f8ac7a55fbdf4668594fb7
This commit is contained in:
@@ -27,7 +27,6 @@ Scope {
|
||||
PanelWindow {
|
||||
id: sidebarRoot
|
||||
visible: sidebarLoader.active
|
||||
focusable: true
|
||||
|
||||
function hide() {
|
||||
sidebarLoader.active = false
|
||||
@@ -49,28 +48,12 @@ Scope {
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ sidebarRoot ]
|
||||
active: false
|
||||
active: sidebarRoot.visible
|
||||
onCleared: () => {
|
||||
if (!active) sidebarRoot.hide()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: sidebarRoot
|
||||
function onVisibleChanged() {
|
||||
delayedGrabTimer.start()
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: delayedGrabTimer
|
||||
interval: ConfigOptions.hacks.arbitraryRaceConditionDelay
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
grab.active = sidebarRoot.visible
|
||||
}
|
||||
}
|
||||
|
||||
// Background
|
||||
Rectangle {
|
||||
id: sidebarRightBackground
|
||||
|
||||
Reference in New Issue
Block a user