Skip to content

Round X window gravity adjustment

Vlad Zahorodnii requested to merge work/zzag/x11-window-round-gravity into master

Qt applications use Static window gravity by default. This means that if a window decoration is created, the client window should remain at the same position in the global coordinate space. To do that, X11Window needs to move the frame geometry by (-borderLeft(), -borderTop()).

On the other hand, after making X11Window::framePosToClientPos() round the window borders, the client window can end up being moved more than expected when applying the gravity adjustment.

This change makes X11Window also round the gravity adjustment so the math is consistent there and in the framePosToClientPos() function.

BUG: 489016

Merge request reports