fix: put the popup close button in the dock, and clear the printer location

Three things, none of them redesigns.

The close affordance for a secondary Chrome window was a separate
layer-shell surface anchored to that window's corner, repositioned by a
five-per-second poll. Any position change tore the surface down and
built another, so on real hardware it chased the window and flickered.
Removed entirely: the GTK button process, the geometry maths that placed
it, the --close-button mode that spawned it, and the poll loop that
drove it. The window helper no longer imports GTK at all.

The behaviour underneath it was right and is kept. The first Chrome
top-level is the classroom browser, tiled and borderless; later ones
float centred at about three quarters of the output. Creation order is
the only thing that can tell them apart — confirmed on a real session,
where every Chrome top-level shares app_id, shell, PID and a null
transient_for, and sway exposes no window properties for Wayland
toplevels at all. Titles are still not used. It now follows sway's own
window events instead of polling, so dragging a popup costs nothing.

Close moved into the dock, which was already on screen and does not
move, so it cannot chase anything. It appears only while a secondary
window is focused and runs kill on that one container. The helper
publishes which window that is; the dock watches the file rather than
polling. A stock sway title bar has no close button, so restoring the
border would not have solved this either.

Two bugs found by looking rather than by testing state. Chrome
renegotiates the size of a popup opened with explicit dimensions after
the resize returns, which left windows centred for a width they no
longer had; placement now settles and repeats once, at creation only, so
dragging is still free. And the dock's Close button came up empty
because show_all does not recurse into a no-show-all widget.

The printer's Location is now blank. CUPS prints it under the queue name
in every dialog, so "Ekklesia Classroom" was a second line the teacher
had to read past; the identity is one word. The already-configured check
includes Location, so a machine set up before this is corrected rather
than left as close enough.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
ekklesia
2026-09-06 20:24:51 -05:00
co-authored by Claude Opus 5
parent a1d8150d7c
commit f65c814eff
18 changed files with 1144 additions and 100 deletions
+26 -6
View File
@@ -35,15 +35,35 @@ before promoting to stable with `./update_stable.sh`.
- [ ] `cups.service` is enabled and `lpstat -r` reports that the scheduler runs
- [ ] `lpinfo -m` contains the generic color PCL 6/PCL XL driver documented in
[printing.md](printing.md)
- [ ] `sudo classroom-printer-setup <printer-ip>` creates only
`Classroom_Color`, enables it, and makes it the system default
- [ ] Repeating the helper updates the same queue without creating a duplicate
- [ ] Chrome opens the system print dialog and shows the configured queue
- [ ] Unrelated label/check-in printers are not automatically added
- [ ] `sudo classroom-printer-setup` creates only `Elmer`, enables it, and
makes it the system default
- [ ] Provisioning creates Elmer automatically at
`socket://10.10.0.155:9100` with description `Elmer`
- [ ] `lpoptions -p Elmer -l` shows `*Normal` for `PrintoutMode` and `*Color`
for `ColorModel`
- [ ] An upgrade removes the old `Classroom_Color` queue
- [ ] Repeating provisioning reports Elmer already configured and does not
rewrite the queue
- [ ] Chrome opens the system print dialog and shows only Elmer
- [ ] `lpstat -e` prints only `Elmer`; neither the Brother label printer nor a
discovered duplicate Ricoh appears
- [ ] `avahi-daemon.service` and `avahi-daemon.socket` are masked
- [ ] The CUPS test page prints in color on the Ricoh MP C3502
- [ ] With the Ricoh powered off, the classroom still boots normally and a job
simply remains queued
## Secondary Chrome windows
- [ ] The first Chrome top-level remains maximised, tiled and borderless
- [ ] A second `google-chrome` top-level floats instead of splitting the main
browser
- [ ] It is centred at roughly three quarters of the logical display
- [ ] Its red Close button is visible and mouse-accessible
- [ ] Close removes only the secondary and reveals the untouched main browser
- [ ] Changing either page title does not change the main/secondary roles
- [ ] A third Chrome top-level also floats and Close targets the newest one
- [ ] Chrome minimise/restore and the dock Browser button still behave normally
## UI scale
UI_SCALE sets sway's output scale, so it scales the whole session.
@@ -92,7 +112,7 @@ into separate layer-shell windows.
- [ ] The Home button returns to Wonder Ink
- [ ] Fullscreen YouTube video uses the whole display
- [ ] Leaving fullscreen restores the correct geometry above the dock
- [ ] Chrome has **no sway title bar** — the window starts at Chrome's
- [ ] The main Chrome window has **no sway title bar** — it starts at Chrome's
own tab strip, and Chrome's tabs and address bar are still there
- [ ] Chrome still maximises and minimises as before
- [ ] After a reboot, no "Restore pages? Chrome didn't shut down