From 9894c2b7ecabcf85ef442e5a5ee0b30f7591dbaf Mon Sep 17 00:00:00 2001 From: Zacharias-Brohn Date: Sun, 9 Nov 2025 01:19:56 +0100 Subject: [PATCH] HyprlandFocusGrab --- Modules/NotificationCenter.qml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Modules/NotificationCenter.qml b/Modules/NotificationCenter.qml index ab62ce2..6bbbb7a 100644 --- a/Modules/NotificationCenter.qml +++ b/Modules/NotificationCenter.qml @@ -23,6 +23,8 @@ PanelWindow { property alias doNotDisturb: dndSwitch.checked visible: false + mask: Region { item: backgroundRect } + IpcHandler { id: ipcHandler target: "root" @@ -61,6 +63,9 @@ PanelWindow { to: Screen.width - backgroundRect.implicitWidth - 10 duration: 300 easing.type: Easing.OutCubic + onStopped: { + focusGrab.active = true; + } } NumberAnimation { @@ -105,16 +110,25 @@ PanelWindow { } } - MouseArea { - anchors.fill: parent - acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton - onClicked: { - if ( root.centerShown ) { - root.centerShown = false; - } + HyprlandFocusGrab { + id: focusGrab + active: false + windows: [ root ] + onCleared: { + root.centerShown = false; } } + // MouseArea { + // anchors.fill: parent + // acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton + // onClicked: { + // if ( root.centerShown ) { + // root.centerShown = false; + // } + // } + // } + Rectangle { id: backgroundRect y: 10