diff options
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index e5b5c6f5b22d..787e5e5448dd 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -656,6 +656,8 @@ bool OpenGLContext::ImplInit() if( glXSwapInterval ) { int (*oldHandler)(Display* /*dpy*/, XErrorEvent* /*evnt*/); + XLockDisplay(m_aGLWin.dpy); + XSync(m_aGLWin.dpy, false); // replace error handler temporarily oldHandler = XSetErrorHandler( oglErrorHandler ); @@ -674,6 +676,7 @@ bool OpenGLContext::ImplInit() // restore the error handler XSetErrorHandler( oldHandler ); + XUnlockDisplay(m_aGLWin.dpy); } } |