diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index a4ecdada48f42258febdaf77b763db96322d9b63..afcd0318780fc7356a3fae54851be0565a9d3c2e 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -399,10 +399,18 @@ xwl_present_check_flip2(RRCrtcPtr crtc, PresentFlipReason *reason) { struct xwl_window *xwl_window = xwl_window_from_window(present_window); + ScreenPtr screen = pixmap->drawable.pScreen; if (!xwl_window) return FALSE; + /* Can't flip if the window pixmap doesn't match the xwl_window parent + * window's, e.g. because a client redirected this window or one of its + * parents. + */ + if (screen->GetWindowPixmap(xwl_window->window) != screen->GetWindowPixmap(present_window)) + return FALSE; + /* * We currently only allow flips of windows, that have the same * dimensions as their xwl_window parent window. For the case of