From 79b0f4dc910c5c359245ffb00d7ae6a0eab20ec3 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 30 Oct 2026 15:26:52 -0700 Subject: [PATCH] test(nix): rest by cells at the left edge in the scrolling suite foot rounds its frame to whole cells, so a window the daemon rests with five pixels showing can end a pixel short of the screen edge. Accept a frame whose right edge is within the platform's tolerance of it. --- .../vm/lib/komorebi_vm/platforms/kde/extras/scrolling.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/scrolling.py b/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/scrolling.py index e7b76c1d..761489d5 100644 --- a/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/scrolling.py +++ b/nix/tests/vm/lib/komorebi_vm/platforms/kde/extras/scrolling.py @@ -64,10 +64,12 @@ def run(platform: KdePlatform, checks: Checks, clients: list[Client]) -> None: print(f" win{i}: {n(i)}") # the window rests with its right edge a few pixels inside the work area, and is as wide as # the one in view: KWin did not pull it further onto the screen, and nothing was resized + # a terminal draws in whole cells, so its frame can be a cell narrower than the tile the daemon + # rests it by, and its right edge a cell short of the few pixels that were asked for checks.check( - f"KWin left win1 at the left edge with a few pixels of it on the screen" + f"KWin left win1 at the left edge, a few pixels of it on the screen or a cell short of them" f" (right edge at {n(1).x + n(1).w}), not pulled back", - kde.wait_for(lambda: 0 < n(1).x + n(1).w <= PARKED_AT_MOST, timeout=10), + kde.wait_for(lambda: -platform.tolerance < n(1).x + n(1).w <= PARKED_AT_MOST, timeout=10), ) checks.check( f"... and it kept its width ({n(1).w} against {n(4).w})",