xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 18 08:50:07 UTC 2024


 hw/xwayland/xwayland-window-buffers.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 3ddb81b15ef8424482a3ec942bb58230cb3eb0ec
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Tue Jan 16 12:17:10 2024 +0100

    xwayland: Update screen pixmap for root window in xwl_window_set_pixmap
    
    If the old window pixmap was the screen pixmap.
    
    Fixes screen->GetScreenPixmap() returning a stale pointer to a destroyed
    pixmap with rootful Xwayland. It would result in a crash after resizing
    the Xwayland window, or at the latest when shutting down.
    
    Fixes: 6779ec5bf67a ("xwayland: Use window pixmap as a window buffer")
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1621

diff --git a/hw/xwayland/xwayland-window-buffers.c b/hw/xwayland/xwayland-window-buffers.c
index 599ad5370..40e19e349 100644
--- a/hw/xwayland/xwayland-window-buffers.c
+++ b/hw/xwayland/xwayland-window-buffers.c
@@ -281,6 +281,10 @@ xwl_window_set_pixmap(WindowPtr window, PixmapPtr pixmap)
 #endif
 
     TraverseTree(window, xwl_set_pixmap_visit_window, &visit);
+
+    if (window == screen->root &&
+        screen->GetScreenPixmap(screen) == visit.old)
+        screen->SetScreenPixmap(pixmap);
 }
 
 static PixmapPtr


More information about the xorg-commit mailing list