From 2c8e0512ddb1e8baa73c5b8a03a79aedb4e5939d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 16 Mar 2020 17:13:59 +0100 Subject: [PATCH] X11: Filter out Xlib errors from other connections --- README.md | 2 ++ src/x11_init.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 3977f0ff..c6b19b76 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,8 @@ information on what to include when reporting a bug. - [X11] Bugfix: IME input of CJK was broken for "C" locale (#1587,#1636) - [X11] Bugfix: Termination would segfault if the IM had been destroyed - [X11] Bugfix: Any IM started after initialization would not be detected + - [X11] Bugfix: Xlib errors caused by other parts of the application could be + reported as GLFW errors - [Wayland] Removed support for `wl_shell` (#1443) - [Wayland] Bugfix: The `GLFW_HAND_CURSOR` shape used the wrong image (#1432) - [Wayland] Bugfix: `CLOCK_MONOTONIC` was not correctly enabled diff --git a/src/x11_init.c b/src/x11_init.c index d640a8fe..c6ba3a19 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -890,6 +890,9 @@ static Window createHelperWindow(void) // static int errorHandler(Display *display, XErrorEvent* event) { + if (_glfw.x11.display != display) + return 0; + _glfw.x11.errorCode = event->error_code; return 0; }