canonical / mir

The Mir compositor
GNU General Public License v2.0
641 stars 103 forks source link

XWayland submits unscaled sizes to window management #3555

Open RAOF opened 3 months ago

RAOF commented 3 months ago

So, here: https://github.com/canonical/mir/blob/6344c950d66bffe74319b5879c45390c45dd4379/src/server/frontend_xwayland/xwayland_surface.cpp#L568-L604 we take the window size from the X11 configure event (so, in unscaled coordinates) and pass it through to the WM code: https://github.com/canonical/mir/blob/6344c950d66bffe74319b5879c45390c45dd4379/src/server/frontend_xwayland/xwayland_surface.cpp#L1191-L1240

I think this is wrong? Isn't window management done in logical pixels, rather than display pixels?

tarek-y-ismail commented 3 months ago

This might potentially affect 1) window management and/or 2) decoration sizing (at least on the first frame?)

Saviq commented 3 months ago

I think this is wrong? Isn't window management done in logical pixels, rather than display pixels?

Or… is it?

tarek-y-ismail commented 3 months ago

Or… is it?

I think XWayland scaling and Wayland scaling both break different things in different ways

AlanGriffiths commented 3 months ago

Or… is it?

It is. And some scenarios need that ("cloning" with the second display with twice the dimensions and running at scale 2).