summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordok.slade <dok.slade@gmail.com>2026-11-11 16:55:50 +0000
committerdok.slade <dok.slade@gmail.com>2026-11-13 00:24:53 +0100
commitfc58424b3c3b8231c48208da2fd716c9d746c033 (patch)
tree03177fde734ba0f24a376f748fd0059ca6ebd4bb
parentdb2afcbdf8f5175a6b8414d9f5e21c978775f651 (diff)
GLX11Window: Don't override the host's event mask on the parent window
GLX11Window::Create called XSelectInput(display, parent_window, StructureNotifyMask) on the host's display connection, which replaces the event mask that the host (DolphinQt or DolphinNoGUI) selected for the window instead of adding to it. As a result, Qt stopped receiving FocusIn/FocusOut, key and mouse events for the render window once an OpenGL context had been created on it. The same issue made DolphinNoGUI lose its key and focus events with OpenGL. The GL code doesn't process any events itself, and the hosts already select StructureNotify, so just drop the call. Also stop discarding pending events in XSync, as the event queue belongs to the host. Fixes https://bugs.dolphin-emu.org/issues/13354
-rw-r--r--Source/Core/Common/GL/GLX11Window.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/Common/GL/GLX11Window.cpp b/Source/Core/Common/GL/GLX11Window.cpp
index 1fb8c1935c..0bd8c0afe0 100644
--- a/Source/Core/Common/GL/GLX11Window.cpp
+++ b/Source/Core/Common/GL/GLX11Window.cpp
@@ -42,9 +42,8 @@ std::unique_ptr<GLX11Window> GLX11Window::Create(Display* display, Window parent
Window window =
XCreateWindow(display, parent_window, 0, 0, parent_attribs.width, parent_attribs.height, 0,
vi->depth, InputOutput, vi->visual, CWColormap, &attribs);
- XSelectInput(display, parent_window, StructureNotifyMask);
XMapWindow(display, window);
- XSync(display, True);
+ XSync(display, False);
return std::make_unique<GLX11Window>(display, parent_window, color_map, window,
parent_attribs.width, parent_attribs.height);