diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index d33b0d1..39ab20a 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -806,6 +806,13 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, * number of pending swaps. */ *swap_target = pPriv->last_swap_target + pPriv->swap_interval; + + /* Hack hack! Always use a swap_target of 1 to avoid hangs if window + * is moved between crtc's with different refresh rate. This effectively + * limits swap_interval settings to 0 and 1 for non-vsync'ed vs. vsync'd + * swaps. Larger swap_intervals are silently clamped to 1. + */ + *swap_target = 1; } else { /* glXSwapBuffersMscOML could have a 0 target_msc, honor it */ *swap_target = target_msc;