xwayland: Do not use manual redirect windows as surface window

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 <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
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: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1564>
This commit is contained in:
Olivier Fourdan 2024-06-04 17:02:57 +02:00 committed by Marge Bot
parent 7605833315
commit 0509b13fa2

View File

@ -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;
}