From 62ac3b312e861d813dc5a4f9c8d3556b86381626 Mon Sep 17 00:00:00 2001From: Robert Bragg <robert@linux.intel.com>Date: Fri, 16 Apr 2010 14:38:52 +0100Subject: [PATCH] glx: handle spurious GLX_BufferSwapComplete events gracefullyInstead of simply aborting we now print out a warning, when a spuriousGLX_BufferSwapComplete event is handled since it seems that people arecoming across the problem (perhaps due to a buggy driver) and makingapps crash in this situation is a bit extreme.--- clutter/glx/clutter-event-glx.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)diff --git a/clutter/glx/clutter-event-glx.c b/clutter/glx/clutter-event-glx.cindex f6c7b4e..2034534 100644--- a/clutter/glx/clutter-event-glx.c+++ b/clutter/glx/clutter-event-glx.c@@ -82,8 +82,14 @@ clutter_backend_glx_handle_event (ClutterBackendX11 *backend_x11, if (stage_x11->xwin == swap_complete_event->drawable) {- g_assert (stage_glx->pending_swaps);- stage_glx->pending_swaps--;+ 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+ stage_glx->pending_swaps--; return TRUE; } }-- 1.6.3.3