forked from Shinonome/dots-hyprland
fix overview toggle mouse hog
This commit is contained in:
@@ -19,6 +19,8 @@ Scope {
|
|||||||
id: root
|
id: root
|
||||||
property var modelData
|
property var modelData
|
||||||
property string searchingText: ""
|
property string searchingText: ""
|
||||||
|
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(root.screen)
|
||||||
|
property bool monitorIsFocused: (Hyprland.focusedMonitor.id == monitor.id)
|
||||||
screen: modelData
|
screen: modelData
|
||||||
// visible: GlobalStates.overviewOpen
|
// visible: GlobalStates.overviewOpen
|
||||||
visible: true
|
visible: true
|
||||||
@@ -42,12 +44,30 @@ Scope {
|
|||||||
HyprlandFocusGrab {
|
HyprlandFocusGrab {
|
||||||
id: grab
|
id: grab
|
||||||
windows: [ root ]
|
windows: [ root ]
|
||||||
active: GlobalStates.overviewOpen
|
property bool canBeActive: root.monitorIsFocused
|
||||||
|
active: false
|
||||||
onCleared: () => {
|
onCleared: () => {
|
||||||
if (!active) GlobalStates.overviewOpen = false
|
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
|
width: columnLayout.width
|
||||||
height: columnLayout.height
|
height: columnLayout.height
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user