diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-14 12:44:09 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-14 12:44:09 +0200 |
| commit | 60eae607ab75988fc441bb4d87ef790175009572 (patch) | |
| tree | b200101e43856d0cf2629b4b3d9564f54ec10be6 /desktop/Drawer.qml | |
| parent | 901e7d83f8af3defe2c602daad98fd3c67e1dd7c (diff) | |
| download | quickshell-60eae607ab75988fc441bb4d87ef790175009572.tar.gz quickshell-60eae607ab75988fc441bb4d87ef790175009572.zip | |
fix(desktop): honest alwaysActive docs and working Escape in confirm
Diffstat (limited to 'desktop/Drawer.qml')
| -rw-r--r-- | desktop/Drawer.qml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml index 368f249..f3b8e6d 100644 --- a/desktop/Drawer.qml +++ b/desktop/Drawer.qml @@ -41,7 +41,7 @@ Scope { } function show(name) { - root.page = name ?? ""; + root.page = root.modules.some(m => m.name === name) ? name : ""; root.open = true; } @@ -94,15 +94,6 @@ Scope { // Keys reach a focused item, never the window: setting // keyboardFocus above is necessary but not sufficient, and // Keys.onEscapePressed on a PanelWindow never fires. See AGENTS.md. - Item { - anchors.fill: parent - focus: true - Keys.onEscapePressed: { - if (root.page) root.page = ""; - else root.close(); - } - } - Rectangle { id: panel anchors { top: parent.top; left: parent.left; bottom: parent.bottom } @@ -113,6 +104,15 @@ Scope { border.width: 1 border.color: Qt.alpha(Theme.text, 0.12) + // The panel is that focused item. As the ancestor of the page + // content, a key pressed in any focused descendant bubbles up + // to it. + focus: true + Keys.onEscapePressed: { + if (root.page) root.page = ""; + else root.close(); + } + // Clicks on the panel must not reach the catcher behind it. MouseArea { anchors.fill: parent } |
