Skip to content

Ensure size is valid after maximising

David Edmundson requested to merge work/d_ed/ensure_size into master

In X11 when a window is maximised if the client is unable to fufill the space provided we centre align the window.

With the new floating point geometry behaviour of centreing changes. Instead of a 1 pixel gap at the top, we get a 0.5 pixel gap either side. When we get into the codepath to "fix" the window in closeHeight we only move the top, giving us an invalid buffer size.

We don't really want to change the logic here; on xwayland with the scaling opt-out path it's feasible for a floating sized logical size to still be representable. This code rounds to the native unit after all the logic has taken effect.

Merge request reports