A server that supports GLX_BufferSwapComplete will always send
these events, so we should just silently ignore them if we've
chosen not to take advantage of the INTEL_swap_event GLX
extension.
http://bugzilla.openedhand.com/show_bug.cgi?id=2102
Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
if (stage_x11->xwin == swap_complete_event->drawable)
{
- if (G_UNLIKELY (stage_glx->pending_swaps == 0))
- {
- g_warning ("Spurious GLX_BufferSwapComplete event received for "
- "stage drawable = 0x%08lx",
- swap_complete_event->drawable);
- }
- else
+ /* Early versions of the swap_event implementation in Mesa
+ * deliver BufferSwapComplete event when not selected for,
+ * so if we get a swap event we aren't expecting, just ignore it.
+ *
+ * https://bugs.freedesktop.org/show_bug.cgi?id=27962
+ */
+ if (stage_glx->pending_swaps > 0)
stage_glx->pending_swaps--;
+
return TRUE;
}
}