diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index b7118792dd..b0141c1dd6 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -378,6 +378,7 @@ static bool gfx_ctx_set_video_mode( // This can blow up on some drivers. It's not fatal, so override errors for this call. int (*old_handler)(Display*, XErrorEvent*) = XSetErrorHandler(nul_handler); XSetInputFocus(g_dpy, g_win, RevertToNone, CurrentTime); + XSync(g_dpy, False); XSetErrorHandler(old_handler); XFree(vi); diff --git a/gfx/context/xegl_ctx.c b/gfx/context/xegl_ctx.c index 8f4653cfa0..07184dde0e 100644 --- a/gfx/context/xegl_ctx.c +++ b/gfx/context/xegl_ctx.c @@ -410,6 +410,7 @@ static bool gfx_ctx_set_video_mode( // This can blow up on some drivers. It's not fatal, so override errors for this call. int (*old_handler)(Display*, XErrorEvent*) = XSetErrorHandler(nul_handler); XSetInputFocus(g_dpy, g_win, RevertToNone, CurrentTime); + XSync(g_dpy, False); XSetErrorHandler(old_handler); XFree(vi);