Skip to content

window: Unconditionally update unconstrained_rect on move/resize

Currently a window's unconstrained_rect is only ever updated if according to the move_resize_internal implementation there was a move, resize or state change. For Wayland windows however resizes or state changes are done in two steps, first the new configuration is sent to client then once client acknowledges it, it is set on the mutter side in another move_resize_internal call. Only the second call would result in the unconstrained_rect being updated.

This started causing problems when unfullscreening windows when the shell started changing the struts for fullscreen windows which hide the panel. First the unfullscreen would resize the window to its pre-fullscreen size as expected, but then the strut change triggers another window resize. This window resize is based on the window's unconstrained_rect, which is still at the fullscreen size because the unfullscreen resize only has sent its configuration, but it has not been acknowledged yet. As a result the strut change causes a resize to the fullscreen size which due to the constraints now looks like a maximized window.

To fix this unconditionally update the unconstrained_rect, to always reflect the latest requested size by mutter (before constraints), rather than the last accepted one by the client. Since the only use of this is as initial rect to apply new constraints to it doesn't really need to be acknowledged by the client or consider any of the constraints applied to it later on.

Fixes #1973 (closed)

Merge request reports