Skip to content

[3.36] window/wayland: Offset position with size mismatch when resizing

Jonas Ådahl requested to merge cherry-pick-8bdd2aa7-2 into gnome-3-36

When we resize a window we send it configure requests with size suggestion. Some clients, e.g. gnome-terminal will limit its size to a discrete set given the font size resulting in the size often not being respected completely, but used as a hint to find a size as large as possible but not larger than the configured size.

When doing an interactive resize dragging the right or top side of a window, this caused issues with the configured window size not matching the one used by the client, as the configured position wouldn't be correct for the actual size. Fix this by offsetting the position given the size mismatch offset, making the position again in sync with the size.

Closes: #1447 (closed)

!1477 (merged)

(cherry picked from commit 8bdd2aa7)

Merge request reports