forked from Shinonome/dots-hyprland
quickshell: fix click-outside-to-close on hyprland 0.49
This commit is contained in:
@@ -27,7 +27,7 @@ Scope {
|
|||||||
|
|
||||||
WlrLayershell.namespace: "quickshell:overview"
|
WlrLayershell.namespace: "quickshell:overview"
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
mask: Region {
|
mask: Region {
|
||||||
|
|||||||
@@ -40,31 +40,6 @@ Scope {
|
|||||||
implicitWidth: modelData.width
|
implicitWidth: modelData.width
|
||||||
implicitHeight: modelData.height
|
implicitHeight: modelData.height
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
|
||||||
id: grab
|
|
||||||
windows: [ sessionRoot ]
|
|
||||||
active: false
|
|
||||||
onCleared: () => {
|
|
||||||
if (!active) sessionRoot.visible = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: sessionRoot
|
|
||||||
function onVisibleChanged() {
|
|
||||||
delayedGrabTimer.start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: delayedGrabTimer
|
|
||||||
interval: ConfigOptions.hacks.arbitraryRaceConditionDelay
|
|
||||||
repeat: false
|
|
||||||
onTriggered: {
|
|
||||||
grab.active = sessionRoot.visible
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: sessionMouseArea
|
id: sessionMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ Scope { // Scope
|
|||||||
exclusiveZone: 0
|
exclusiveZone: 0
|
||||||
implicitWidth: Appearance.sizes.sidebarWidthExtended
|
implicitWidth: Appearance.sizes.sidebarWidthExtended
|
||||||
WlrLayershell.namespace: "quickshell:sidebarLeft"
|
WlrLayershell.namespace: "quickshell:sidebarLeft"
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
// Hyprland 0.49: Focus is always exclusive and setting this breaks mouse focus grab
|
||||||
|
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ Scope {
|
|||||||
exclusiveZone: 0
|
exclusiveZone: 0
|
||||||
implicitWidth: sidebarWidth
|
implicitWidth: sidebarWidth
|
||||||
WlrLayershell.namespace: "quickshell:sidebarRight"
|
WlrLayershell.namespace: "quickshell:sidebarRight"
|
||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
// Hyprland 0.49: Focus is always exclusive and setting this breaks mouse focus grab
|
||||||
|
// WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
Reference in New Issue
Block a user