From e391d53076b9ee649c31a71a4a5fa69d7de910c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 18 Jan 2024 16:07:48 +0100 Subject: [PATCH] xwayland/present: Update screen pixmap in xwl_present_execute If the screen pixmap was also the toplevel window pixmap. This can't happen yet, it will with the next commit though. --- hw/xwayland/xwayland-present.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 941be06da..ae6bf7489 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -883,6 +883,11 @@ xwl_present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) vblank->pixmap->screen_y = old_pixmap->screen_y; #endif present_set_tree_pixmap(toplvl_window, old_pixmap, vblank->pixmap); + + if (toplvl_window == screen->root && + screen->GetScreenPixmap(screen) == old_pixmap) + screen->SetScreenPixmap(vblank->pixmap); + vblank->pixmap->refcnt++; dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);