xwayland: Move XRandR emulation to the ResizeWindow hook

This restores the handling of the XRandR emulation for Xwayland rootless
where it was before commit fa7b1c20.

Some compositors may trigger a protocol error if the viewport source is
larger than the actual window size, having that handled in the window
resize hook makes sure we do not regress.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1521>
This commit is contained in:
Olivier Fourdan 2024-05-06 13:57:28 +02:00 committed by Marge Bot
parent 31d6f9998d
commit 702a419c39

View File

@ -1811,11 +1811,6 @@ xwl_config_notify(WindowPtr window,
xwl_screen->ConfigNotify = screen->ConfigNotify;
screen->ConfigNotify = xwl_config_notify;
if (size_changed && xwl_window) {
if (xwl_window_get(window) || xwl_window_is_toplevel(window))
xwl_window_check_resolution_change_emulation(xwl_window);
}
return ret;
}
@ -1838,6 +1833,8 @@ xwl_resize_window(WindowPtr window,
screen->ResizeWindow = xwl_resize_window;
if (xwl_window) {
if (xwl_window_get(window) || xwl_window_is_toplevel(window))
xwl_window_check_resolution_change_emulation(xwl_window);
if (window == screen->root) {
#ifdef XWL_HAS_LIBDECOR
unsigned int decor_width, decor_height;