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.
This commit is contained in:
Michel Dänzer 2024-01-18 16:07:48 +01:00 committed by Michel Dänzer
parent 0cbf6d9326
commit e391d53076

View File

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