diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 6076f6498..d177abdd8 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -421,10 +421,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