diff --git a/.config/quickshell/modules/cheatsheet/Cheatsheet.qml b/.config/quickshell/modules/cheatsheet/Cheatsheet.qml index 296ead29..91a46852 100644 --- a/.config/quickshell/modules/cheatsheet/Cheatsheet.qml +++ b/.config/quickshell/modules/cheatsheet/Cheatsheet.qml @@ -22,7 +22,6 @@ Scope { // Scope sourceComponent: PanelWindow { // Window id: cheatsheetRoot visible: cheatsheetLoader.active - focusable: true anchors { top: true @@ -49,28 +48,12 @@ Scope { // Scope HyprlandFocusGrab { // Click outside to close id: grab windows: [ cheatsheetRoot ] - active: false + active: cheatsheetRoot.visible onCleared: () => { if (!active) cheatsheetRoot.hide() } } - Connections { - target: cheatsheetRoot - function onVisibleChanged() { - delayedGrabTimer.start() - } - } - - Timer { - id: delayedGrabTimer - interval: ConfigOptions.hacks.arbitraryRaceConditionDelay - repeat: false - onTriggered: { - grab.active = cheatsheetRoot.visible - } - } - // Background Rectangle { id: cheatsheetBackground diff --git a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml index 9c4547ee..bb578410 100644 --- a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml +++ b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml @@ -27,7 +27,7 @@ Scope { // Scope PanelWindow { // Window id: sidebarRoot visible: sidebarLoader.active - focusable: true + property int selectedTab: PersistentStates.sidebar.leftSide.selectedTab property bool extend: false property bool pin: false @@ -37,7 +37,10 @@ Scope { // Scope sidebarLoader.active = false } - exclusiveZone: pin ? sidebarWidth : 0 + exclusiveZone: { + console.log(sidebarRoot.pin ? sidebarWidth : 0) + return sidebarRoot.pin ? sidebarWidth : 0 + } implicitWidth: Appearance.sizes.sidebarWidthExtended WlrLayershell.namespace: "quickshell:sidebarLeft" // Hyprland 0.49: OnDemand is Exclusive, Exclusive just breaks click-outside-to-close @@ -57,32 +60,12 @@ Scope { // Scope HyprlandFocusGrab { // Click outside to close id: grab windows: [ sidebarRoot ] - active: false + active: sidebarRoot.visible && !sidebarRoot.pin onCleared: () => { if (!active) sidebarRoot.hide() } } - Connections { - target: sidebarRoot - function onVisibleChanged() { - delayedGrabTimer.start() - swipeView.children[0].children[0].children[sidebarRoot.selectedTab].forceActiveFocus() - } - function onPinChanged() { - grab.active = !sidebarRoot.pin - } - } - - Timer { - id: delayedGrabTimer - interval: ConfigOptions.hacks.arbitraryRaceConditionDelay - repeat: false - onTriggered: { - grab.active = sidebarRoot.visible && !sidebarRoot.pin - } - } - // Background Rectangle { id: sidebarLeftBackground diff --git a/.config/quickshell/modules/sidebarRight/SidebarRight.qml b/.config/quickshell/modules/sidebarRight/SidebarRight.qml index d38de557..f347b069 100644 --- a/.config/quickshell/modules/sidebarRight/SidebarRight.qml +++ b/.config/quickshell/modules/sidebarRight/SidebarRight.qml @@ -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