xwayland: stop translating _NET_WM_STRUT_PARTIAL coordinates

Translating the right/bottom coordinates from offsets to absolute
coordinates in wlroots (rather than in the compositor) was supposed to
be more reliable, since wlroots had access to the X11 screen size.

It ended up being less reliable, because the screen size values
(xwm->screen->width_in_pixels/height_in_pixels) are not updated when the
output layout changes.

So let's remove the translation from wlroots, and let the compositor
figure it out. From what I can understand of the current XWayland code,
the X11 screen size should generally match the overall wlr_output_layout
bounding box, which the compositor has access to.
This commit is contained in:
John Lindgren 2023-10-11 03:37:46 -04:00
parent 0bb445eeff
commit 6114dd6a83
2 changed files with 5 additions and 16 deletions

View file

@ -124,8 +124,11 @@ struct wlr_xwayland_surface {
xcb_icccm_wm_hints_t *hints;
xcb_size_hints_t *size_hints;
/*
* _NET_WM_STRUT_PARTIAL (used by e.g. XWayland panels;
* right/bottom are translated into root x/y coordinates)
* _NET_WM_STRUT_PARTIAL (used by e.g. XWayland panels).
* Note that right/bottom values are offsets from the lower
* right corner of the X11 screen, and the exact relation
* between X11 screen coordinates and the wlr_output_layout
* depends on the XWayland implementation.
*/
xcb_ewmh_wm_strut_partial_t *strut_partial;