From fc58424b3c3b8231c48208da2fd716c9d746c033 Mon Sep 17 00:00:00 2001 From: "dok.slade" Date: Wed, 11 Nov 2026 16:55:50 +0000 Subject: [PATCH] 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 --- Source/Core/Common/GL/GLX11Window.cpp | 3 +-- 1 file changed, 1 insertion(+), 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::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(display, parent_window, color_map, window, parent_attribs.width, parent_attribs.height);