classroom-dvd-session needs to ask sway whether VLC has taken the
screen, which is the same tree walking classroom-window already does.
One copy, in a module both import; classroom-window loses a third of its
length.
The state machine is worth protecting through a move like that, so its
regression test comes with it: the exact swaymsg commands for launch,
focus, minimise, restore, Super+M, Super+Shift+M, the scratchpad rescue
and sway not running at all.
Co-Authored-By: Claude Opus 5 <[email protected]>
Nothing puts windows there any more, but a window parked by an older
classroom build — the exact case this work exists to fix — would
otherwise be invisible to restore and stranded until the next reboot.
Counting the scratchpad as hidden means the Browser button and
Super+Shift+M both pull it back, tiled.
Co-Authored-By: Claude Opus 5 <[email protected]>
The scratchpad technically minimized Chrome, but sway hands scratchpad
windows back floating, so restoring gave a draggable window instead of
the maximized one the user put away. Park windows on a hidden workspace
as ordinary tiled containers instead, and move them back to the visible
workspace on restore.
classroom-window carries the whole state machine, so the dock buttons
and Super+M share one implementation:
not running -> launch
unfocused -> focus
focused -> minimize
minimized -> restore, tiled and maximized
Fullscreen is dropped on the way out, since a container parked while
still fullscreen keeps drawing over everything else. floating disable on
the way back also rescues windows left floating by the old scratchpad
path.
Super+Shift+M restores the newest minimized window, so nothing can get
stranded on the hidden workspace.
Co-Authored-By: Claude Opus 5 <[email protected]>