From 4158f63557b715bdb8354111c734cc83b68b1bf7 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 29 Oct 2026 18:17:44 -0700 Subject: [PATCH] fix(nix): focus_follows_mouse rests the pointer over the focused window On again, the scenario moved the pointer over the first window, which already had the focus, so it waited for nothing and moved on to the second at once. A platform that follows the pointer by a hover delay never saw it enter the first. The pointer now rests there for a moment, as it would for a person. --- .../lib/komorebi_vm/core/scenarios/focus_follows_mouse.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/tests/vm/lib/komorebi_vm/core/scenarios/focus_follows_mouse.py b/nix/tests/vm/lib/komorebi_vm/core/scenarios/focus_follows_mouse.py index 44f03f54..aca4d4f1 100644 --- a/nix/tests/vm/lib/komorebi_vm/core/scenarios/focus_follows_mouse.py +++ b/nix/tests/vm/lib/komorebi_vm/core/scenarios/focus_follows_mouse.py @@ -67,9 +67,12 @@ def run(platform: Platform, checks: Checks, first: Client, second: Client) -> No platform.komorebic("focus-follows-mouse", "enable") _settle(platform) - # the pointer rests over the second window: it has to go into a window to be followed + # the pointer rests over the second window: it has to go into a window to be followed. The + # first window already has the focus, so there is nothing to wait for there: the pointer rests + # over it for a moment, as a person's would, and a platform that follows the pointer by a + # hover delay (Windows) has seen it enter that window before it enters the other platform.pointer.move(*a) - platform.wait_for(lambda: _focused(platform, first), timeout=10) + _settle(platform) platform.pointer.move(*b) checks.check( "on again, the pointer over the second window gives it the focus",