Skip to content

fix: window stuck maximized on Wayland after early maximize() - #53125

Open
trop[bot] wants to merge 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-window-stuck-maximized-on-wayland-after-early-maximize--1787470909693
Open

fix: window stuck maximized on Wayland after early maximize()#53125
trop[bot] wants to merge 1 commit into
43-x-yfrom
trop/43-x-y-bp-fix-window-stuck-maximized-on-wayland-after-early-maximize--1787470909693

Conversation

@trop

@trop trop Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Backport of #53063

See that PR for details.

Notes: Fixed BrowserWindow.unmaximize() and restore() having no effect on Wayland when the window was maximized immediately after creation.

A toplevel that calls Maximize() before the first xdg_toplevel.configure has
been received could get stuck maximized: the compositor's state-less reply
to the initial commit is compared against the optimistically applied
kMaximized state and latches previously_maximized_ = true, after which
Restore() re-requests kMaximized, is deduplicated, and unset_maximized is
never sent.

Make Restore() honour previously_maximized_ only when leaving the minimized
or fullscreen state, and make TriggerStateChanges() also consult
applied_state() so the unset request is not skipped while older bounds
requests are still in flight.

This should be upstreamed; the patch can be removed once that lands.

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
@trop
trop Bot requested a review from a team as a code owner August 23, 2026 07:42
@trop
trop Bot requested a review from VerteDinde August 23, 2026 07:42
@trop trop Bot added 43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants