mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
glx: Protect GLX SwapEvent symbols
We need to guard the usage of symbols related to the GLX_INTEL_swap_event extension, to avoid breaking on platforms and/or versions of Mesa that do not expose that extension.
This commit is contained in:
parent
4f333e0e5d
commit
6aafb7d3de
@ -238,14 +238,22 @@ glx_event_filter_cb (XEvent *xevent, void *data)
|
||||
xevent->xconfigure.width,
|
||||
xevent->xconfigure.height);
|
||||
}
|
||||
|
||||
/* we let ConfigureNotify pass through */
|
||||
return COGL_XLIB_FILTER_CONTINUE;
|
||||
}
|
||||
else if (xevent->type ==
|
||||
(glx_renderer->glx_event_base + GLX_BufferSwapComplete))
|
||||
|
||||
#ifdef GLX_INTEL_swap_event
|
||||
if (xevent->type == (glx_renderer->glx_event_base + GLX_BufferSwapComplete))
|
||||
{
|
||||
GLXBufferSwapComplete *swap_event = (GLXBufferSwapComplete *)xevent;
|
||||
GLXBufferSwapComplete *swap_event = (GLXBufferSwapComplete *) xevent;
|
||||
|
||||
notify_swap_buffers (context, swap_event->drawable);
|
||||
|
||||
/* remove SwapComplete events from the queue */
|
||||
return COGL_XLIB_FILTER_REMOVE;
|
||||
}
|
||||
#endif /* GLX_INTEL_swap_event */
|
||||
|
||||
return COGL_XLIB_FILTER_CONTINUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user