mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
fix overview toggle mouse hog
This commit is contained in:
@@ -19,6 +19,8 @@ Scope {
|
||||
id: root
|
||||
property var modelData
|
||||
property string searchingText: ""
|
||||
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen)
|
||||
property bool monitorIsFocused: (Hyprland.focusedMonitor.id == monitor.id)
|
||||
screen: modelData
|
||||
// visible: GlobalStates.overviewOpen
|
||||
visible: true
|
||||
@@ -42,12 +44,30 @@ Scope {
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ root ]
|
||||
active: GlobalStates.overviewOpen
|
||||
property bool canBeActive: root.monitorIsFocused
|
||||
active: false
|
||||
onCleared: () => {
|
||||
if (!active) GlobalStates.overviewOpen = false
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: GlobalStates
|
||||
function onOverviewOpenChanged() {
|
||||
delayedGrabTimer.start()
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: delayedGrabTimer
|
||||
interval: ConfigOptions.hacks.arbitraryRaceConditionDelay
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
if (!grab.canBeActive) return
|
||||
grab.active = GlobalStates.overviewOpen
|
||||
}
|
||||
}
|
||||
|
||||
width: columnLayout.width
|
||||
height: columnLayout.height
|
||||
|
||||
|
||||
Reference in New Issue
Block a user