glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap

Present didn't provide the 'kind' argument to the
present_complete_notify hook that GLX uses to construct
GLX_BufferSwapComplete events, so GLX was reporting events for
PresentCompleteKindMSC notifications, which resulted in duplicate
GLX_BufferSwapComplete events and crashes in clutter.

See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit bf338efc67)
[backport to 1.16: check 'kind' in the caller to avoid ABI change]
Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Keith Packard 2014-09-04 08:36:07 -07:00 committed by Julien Cristau
parent fbe977941a
commit c48d07cf0e

View file

@ -173,7 +173,7 @@ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 se
}
}
}
if (complete_notify)
if (complete_notify && kind == PresentCompleteKindPixmap)
(*complete_notify)(window, mode, serial, ust, msc);
}