voelin-gpui: the maximize guard covers the first two reports only

A window opened to be maximized dropped every windowed report until it
was seen maximized, so a resize the user made before the window manager
answered (or under one that never maximizes, a tiling one) was never
kept. The guard is now a budget of OPENING_REPORTS = 2 windowed reports,
the place the window opened with and the configure an X11 window manager
may send at the map; a maximized report ends it, and the reports after
it are the user's. Tests on the GPUI test platform: the root state keeps
the third report, the shell keeps a resize that follows the two. The
sentence in docs/ui.md says so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-27 23:22:40 +03:00
1 parent 0d44148ef5
commit 9ab56ec973
3 files changed
+83 -23

No files matched your search

+8 -5
View File
@@ -1293,11 +1293,14 @@ compositor is expected to honour that, which was not run here), and the window
asks again when its first frame is drawn if it is not maximized by then (`MainView`: `Window::zoom_window`, which
toggles on X11, hence the check), because an X11 window manager manages a window
only from its map, so the early request is lost (openbox: the window opened at
its restored size). Until the window has been seen maximized, what it reports
is the place it opened with and is not kept, so a run that ends before the
window manager answers, or one whose window manager never maximizes (a tiling
one), leaves `maximized: true` as it found it; once it has been seen maximized,
what the window reports is the user's (restoring it is kept). A maximized
its restored size). The first two windowed reports of a window opened to be
maximized (the place it opened with, and the configure an X11 window manager
may send when it maps the window) are not kept, so a run that ends before the
window manager answers leaves `maximized: true` as it found it; the reports
after them are the user's, kept whether or not the window was seen maximized (a
resize before the window manager answered, or under one that never maximizes, a
tiling one, is kept), and once it has been seen maximized what it reports is
the user's too (restoring it is kept). A maximized
window is kept with the size it returns to (X11 reports the screen's; Wayland
the size it returns to). The `maximized` request itself needs a real window:
GPUI's test platform has no zoom, so the tests count the request and report the