fix(qs): show power menu only on the focused screen

A PowerMenu window exists per screen and every one of them lit up on
open. Latch the focused monitor in Actions at open time — same shape as
launcherScreen — and gate each window's open state on it, so exactly one
copy draws and takes keyboard focus.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
nvrlandClaude Opus 5 committed 2026-09-18 01:53:56 +02:00
1 parent 1cf5a4b68d
commit 3fb89c4370
2 files changed
+15 -4

No files matched your search

+8 -1
View File
@@ -29,9 +29,16 @@ Singleton {
// keyboard focus and because a window should not hop mid-query.
property string launcherScreen: ""
// Same story for the power menu: a window per screen, one of them wanted.
property string powerMenuScreen: ""
signal osdRequested(string kind)
function togglePowerMenu() { root.powerMenuOpen = !root.powerMenuOpen; }
function togglePowerMenu() {
if (!root.powerMenuOpen)
root.powerMenuScreen = root.focusedScreenName();
root.powerMenuOpen = !root.powerMenuOpen;
}
function closePowerMenu() { root.powerMenuOpen = false; }
function lock() { root.powerMenuOpen = false; root.lockRequested = true; }