summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2024-06-04 17:26:29 +0200
committerOlivier Fourdan <fourdan@gmail.com>2024-07-04 08:36:40 +0000
commit05f44115232390b96bff49af363bc5c73feedfd2 (patch)
treec53afa79cfb2ad01cba6c8bf6297e5be105a6d62 /hw
parentfbd40e878ba4691542916a9bba38ec825007534f (diff)
xwayland: Stop on first unmapped child
If a child window of the same size is unmapped, we should stop walking the tree looking for the surface window to use. Whatever lies beneath is not visible anyway. This also fixes an issue with the Damage list becoming corrupted when destroying a window, because the first thing that DeleteWindow() does is to unmap the window and crush the window tree underneath it. 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/1680 (cherry picked from commit 32e16082c5297776a56e9fade91f72e603adda89) Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1569>
Diffstat (limited to 'hw')
-rw-r--r--hw/xwayland/xwayland-window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index 84291c622..c2bd792e4 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -1351,6 +1351,9 @@ xwl_window_update_surface_window(struct xwl_window *xwl_window)
if (!RegionEqual(&window->winSize, &surface_window->winSize))
break;
+ if (!window->mapped)
+ break;
+
/* The surface window must be top-level for its window pixmap */
window_pixmap = screen->GetWindowPixmap(window);
if (window_pixmap == surface_pixmap)