From 0509b13fa22f56af4539214e3da5be2348d945ce Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 4 Jun 2024 17:02:57 +0200 Subject: [PATCH] xwayland: Do not use manual redirect windows as surface window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While walking the window tree looking for the surface window to use, we should ignore windows using manual redirection. If a client manually redirects a window, it has control over how the contents of that window are presented. It's not safe to present them directly to the Wayland compositor. v2: break instead of continue, reword commit message (Michel) Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Fixes: 3a0fc268 - xwayland: Add xwl_window::surface_window Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1677 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1679 Part-of: --- hw/xwayland/xwayland-window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index 05f45e16f..84291c622 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -1365,6 +1365,9 @@ xwl_window_update_surface_window(struct xwl_window *xwl_window) if (window->drawable.depth == 32) continue; + if (window->redirectDraw == RedirectDrawManual) + break; + surface_window = window; }