mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
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>
This commit is contained in:
@@ -2508,13 +2508,16 @@ __glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust,
|
||||
|
||||
#if PRESENT
|
||||
static void
|
||||
__glXpresentCompleteNotify(WindowPtr window, CARD8 present_mode, CARD32 serial,
|
||||
uint64_t ust, uint64_t msc)
|
||||
__glXpresentCompleteNotify(WindowPtr window, CARD8 present_kind, CARD8 present_mode,
|
||||
CARD32 serial, uint64_t ust, uint64_t msc)
|
||||
{
|
||||
__GLXdrawable *drawable;
|
||||
int glx_type;
|
||||
int rc;
|
||||
|
||||
if (present_kind != PresentCompleteKindPixmap)
|
||||
return;
|
||||
|
||||
rc = dixLookupResourceByType((void **) &drawable, window->drawable.id,
|
||||
__glXDrawableRes, serverClient, DixGetAttrAccess);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user