From 60eae607ab75988fc441bb4d87ef790175009572 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 14 Sep 2026 12:44:09 +0200 Subject: fix(desktop): honest alwaysActive docs and working Escape in confirm --- desktop/modules/vm/README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'desktop/modules/vm/README.md') diff --git a/desktop/modules/vm/README.md b/desktop/modules/vm/README.md index 79c60f5..fbb7bde 100644 --- a/desktop/modules/vm/README.md +++ b/desktop/modules/vm/README.md @@ -38,10 +38,9 @@ Write those two paths out in full in the real config: `exec_cmd` runs the command directly, with no shell to expand `~`. The drawer opens on the monitor named by the `monitor` property at the top of -`VmPanel.qml`, defaulting to `DP-3`, and falls back to the first screen when -that one is not connected. It dims the rest of that monitor, because the -secondary screen usually has a real window on it, and takes keyboard focus so -Escape closes it and a delete can be confirmed by typing. +`Drawer.qml`, defaulting to `DP-1`, and falls back to the first screen when +that one is not connected. It takes keyboard focus so Escape closes it and a +delete can be confirmed by typing. ## Where the numbers come from @@ -73,9 +72,11 @@ for the whole session, panel open or not. Starting a VM from `virsh` or virt-manager updates the drawer, and opening it shows current state rather than whatever was true last time. -Statistics do need sampling, on a 2 second timer, but only while the drawer -is open: `Virsh.sampling` follows the panel's `open`. A closed panel costs one -idle process waiting on an event socket. +Statistics do need sampling, on a 2 second timer, but only while the vm page +is constructed: `Virsh.sampling` follows the page, set in the page's +`Component.onCompleted` and cleared in `Component.onDestruction`. The page is +lazily loaded, so a closed page costs one idle process waiting on an event +socket. ## Two things that bite @@ -87,9 +88,11 @@ the key then has nothing to talk to and silently does nothing. **Key events reach an item, not a window.** Setting `keyboardFocus` on the layer shell is necessary but not sufficient: `Keys.onEscapePressed` on the -PanelWindow itself never fires, because no item inside holds focus. A filled -`Item` with `focus: true` catches it, and takes focus back when the TextInput -in a delete confirmation gives it up. +PanelWindow itself never fires, because no item inside holds focus. The panel +rectangle is focused as the ancestor of the page content, so a key from any +focused descendant bubbles up to it. The delete confirmation's `TextInput` +also handles Escape itself, cancelling the pending confirmation rather than +navigating away. ## Destructive actions -- cgit v1.2.3