Files
komorebi/nix/linux/tests/vm/suites/kwin-restart/test.py
T
LGUG2Z f01853ceca refactor(repo): move the KDE and macOS nix files under nix/ (pure move)
komorebi-for-kde/nix/ -> nix/linux/
komorebi-for-mac/nix/ -> nix/macos/

The nix expressions of the platforms (modules, option files, VM test suites, kwin effects,
the darwin module) sit next to the existing nix/workspace-src.nix. Renames only (252
files); the flakes that import them are replaced by one root flake later in this stack, so
nix does not evaluate at this revision.
2026-11-05 15:03:27 -08:00

26 lines
1.1 KiB
Python

# KWin restarts under a running daemon, as when the compositor of a session crashes or is replaced:
# the session bus stays, KWin leaves it and comes back, and the clients of the old KWin go with it.
# What only a real KWin can tell is in `komorebi_vm.platforms.kde.extras.kwin_restart`: that the
# daemon sees KWin go and come back on the bus, that it takes every window of the old KWin out of
# its layout, that it loads its script into the new KWin, and that it tiles what opens there.
# Twice, as the spike did.
from komorebi_vm import Checks, Kde
from komorebi_vm.core.suite import platform_only, run_suite
from komorebi_vm.kde_platform import KdePlatform
from komorebi_vm.platforms.kde.extras import kwin_restart as kde_restart
W, H = 1920, 1080
start_all()
machine.wait_for_unit("multi-user.target")
machine.wait_for_unit("user@1000.service")
checks = Checks()
kde = Kde.headless(machine, "main", size=(W, H), scale=SCALE)
platform = KdePlatform(kde, (W, H))
run_suite(checks, platform_only("kde", kde_restart.run, platform, checks, []))
kde.stop()
checks.finish()