From 45ef91998e4586dbf16c6ea3db0a9f4e19f4487e Mon Sep 17 00:00:00 2001 From: ATMDA Date: Fri, 14 Nov 2025 17:42:49 -0500 Subject: tray: wireless password input popout --- modules/bar/popouts/Wrapper.qml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'modules/bar/popouts/Wrapper.qml') diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml index 4be47e4..5ef4f9d 100644 --- a/modules/bar/popouts/Wrapper.qml +++ b/modules/bar/popouts/Wrapper.qml @@ -55,7 +55,25 @@ Item { implicitWidth: nonAnimWidth implicitHeight: nonAnimHeight - Keys.onEscapePressed: close() + focus: hasCurrent + Keys.onEscapePressed: { + // Forward escape to password popout if active, otherwise close + if (currentName === "wirelesspassword" && content.item) { + const passwordPopout = content.item.children.find(c => c.name === "wirelesspassword"); + if (passwordPopout && passwordPopout.item) { + passwordPopout.item.closeDialog(); + return; + } + } + close(); + } + + Keys.onPressed: event => { + // Don't intercept keys when password popout is active - let it handle them + if (currentName === "wirelesspassword") { + event.accepted = false; + } + } HyprlandFocusGrab { active: root.isDetached @@ -70,6 +88,14 @@ Item { property: "WlrLayershell.keyboardFocus" value: WlrKeyboardFocus.OnDemand } + + Binding { + when: root.hasCurrent && root.currentName === "wirelesspassword" + + target: QsWindow.window + property: "WlrLayershell.keyboardFocus" + value: WlrKeyboardFocus.OnDemand + } Comp { id: content -- cgit v1.2.3-freya