From e6c649e6e6b7184c61500ed2740edb4ac7274a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Mon, 5 Aug 2024 18:42:36 +0200 Subject: [PATCH] xwayland/glamor: Try manual redirect only if parent window has depth 32 That's the case 8e8bc0a1ef33 ("xwayland: Try manual redirection for surface window in glamor_check_flip") was intended for. If the parent window doesn't have depth 32, the automatic redirection might have been done by a client, in which case doing the manual redirection may run into trouble. Fixes: 8e8bc0a1ef33 ("xwayland: Try manual redirection for surface window in glamor_check_flip") Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1724 Part-of: --- hw/xwayland/xwayland-glamor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index 3e62fa7cd..c3aa483ff 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -104,7 +104,8 @@ xwl_glamor_check_flip(WindowPtr present_window, PixmapPtr pixmap) } if (surface_window->redirectDraw == RedirectDrawAutomatic && - surface_window->drawable.depth != 32) + surface_window->drawable.depth != 32 && + surface_window->parent->drawable.depth == 32) xwl_present_maybe_redirect_window(surface_window); return TRUE;