Avoid async error handling breaking XSetInputFocus.

This commit is contained in:
Themaister 2013-02-23 15:20:47 +01:00
parent 00d7d6c7ca
commit c78239a10d
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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);