cogl: Remember to bind the GLX context to our drawable before querying
Or else glXQueryDrawable
will fail per the GLX_EXT_buffer_age
spec:
If querying GLX_BACK_BUFFER_AGE_EXT and draw is not bound to the calling thread's current context a GLXBadDrawable error is generated.
This mistake went unnoticed until mtk_x11_error_trap_push
was introduced
(55e3b2e5) because for some reason it is incapable of trapping
glXQueryDrawable
. Prior to that it seems
cogl_onscreen_glx_get_buffer_age
would trap and so always returned zero.
This means we're reenabling clipped redraws on X11 here for the first time in a long time.
Closes: #3007 (closed)
Edited by Daniel van Vugt