-
Olivier Fourdan authored
When using GLX, xfwm4 relies on glXSwapBuffers() for vblank. Normally, glXSwapBuffers() is non blocking, unless the previous call is still pending. That means that if xfwm4 queues glXSwapBuffers() faster than the refresh rate, the following calls will be blocking, stalling the window manager completely, which is bad for obvious reasons. To avoid queuing a new glXSwapBuffers() before the previous one is complete, use a GL sync mechanism. Typically, we insert a GL Sync object just after the glXSwapBuffers() command, and check if the GL Sync is triggered before redrawing again, just like we do with Xpresent. Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
7e75a83d