From ee2d036bbf7dd34cb512455a98a49f6f1c3228cd Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 2 Jun 2015 17:25:09 +0200 Subject: [PATCH] Fixed destination of _NET_WM_PING reply. --- README.md | 1 + src/x11_window.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa015e15..14d7516b 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ GLFW bundles a number of dependencies in the `deps/` directory. - [Cocoa] Bugfix: Resizing a window to its minimum size would segfault - [Cocoa] Bugfix: Creating or showing a window would make its context current - [X11] Bugfix: `glfwInit` would segfault on systems without RandR + - [X11] Bugfix: The response to `_NET_WM_PING` was sent to the wrong window - [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option - [WGL] Bugfix: Swap interval was ignored when DWM was enabled - [GLX] Added dependency on `libdl` on systems where it provides `dlopen` diff --git a/src/x11_window.c b/src/x11_window.c index 04383750..9405a1ef 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1132,12 +1132,14 @@ static void processEvent(XEvent *event) // The window manager is pinging the application to ensure it's // still responding to events - event->xclient.window = _glfw.x11.root; + XEvent reply = *event; + reply.xclient.window = _glfw.x11.root; + XSendEvent(_glfw.x11.display, - event->xclient.window, + _glfw.x11.root, False, SubstructureNotifyMask | SubstructureRedirectMask, - event); + &reply); } } else if (event->xclient.message_type == _glfw.x11.XdndEnter)