Browse Source

X11: Fix detectEWMH not releasing error handler

If detectEWMH failed to query the EWMH helper window, it would return
without restoring the previous Xlib error handler.  This was bad
(because other code might also be using the facility) and bad (because
GLFW would assert the next time it tried to grab the error handler).

This commit adds the necessary release call.

Closes #2593
Fixes #2601
Closes #2631
er-azh 1 year ago
parent
commit
cf4734ce8a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/x11_init.c

+ 1 - 0
src/x11_init.c

@@ -535,6 +535,7 @@ static void detectEWMH(void)
                                    XA_WINDOW,
                                    (unsigned char**) &windowFromChild))
     {
+        _glfwReleaseErrorHandlerX11();
         XFree(windowFromRoot);
         return;
     }