From 702a419c39af07996b5775a24e712eb3fe63d0bc Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 6 May 2024 13:57:28 +0200 Subject: [PATCH] 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 Part-of: --- hw/xwayland/xwayland-window.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 7a25e88b8..05f45e16f 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -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;