X11: Filter out Xlib errors from other connections

2c8e0512dd
This commit is contained in:
Kovid Goyal 2020-05-01 14:59:16 +05:30
parent 2fc6f3b542
commit 9da5bee178
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

4
glfw/x11_init.c vendored
View File

@ -502,8 +502,10 @@ static Window createHelperWindow(void)
// X error handler
//
static int errorHandler(Display *display UNUSED, XErrorEvent* event)
static int errorHandler(Display *display, XErrorEvent* event)
{
if (_glfw.x11.display != display)
return 0;
_glfw.x11.errorCode = event->error_code;
return 0;
}