The system's close reaches Wails as WindowClosing, which destroyed the
panel while h.panel and the tray still held it. makePanel now hooks
WindowClosing: the panel cancels and hides; one lightweight mode let go
(h.panel no longer it) still closes.
Run: TestPanelCloseHidesIt (AppKit, new) passes; with the hook's check
forced to let the close through it fails "panel close: the panel closed
for good; the tray icon can't open it again". On real KWin 6.3.6 Wayland
(kwin_wayland --virtual, Debian trixie container, GTK 3 build) a KWin
script closeWindow() on the panel (what its title bar X does): with the
hook alive=true and a second Show is visible; without it alive=false and
Show shows nothing. go test ./internal/gui ok (darwin, GUI tag); go vet,
go build ok; GOOS=linux/windows go vet -tags nogui ./internal/gui ok,
GOOS=windows go vet ./internal/gui ok. go test -tags nogui ./...: all ok
but internal/agent (11m timeout) and internal/plugin
TestHostRunsAsMagpieBun under load average ~110; neither imports
internal/gui, and TestHostRunsAsMagpieBun passes alone. Not tried: the
reporter's own Manjaro Plasma session; Windows' Alt+F4 on the box.