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
This commit is contained in:
er-azh 2024-07-25 03:17:43 -04:00 committed by Camilla Löwy
parent 21fea01161
commit cf4734ce8a

View File

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