From 28ba50fa45395e0a40ae0d7b797e2aaf8a80f756 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 18 Feb 2024 17:47:57 +0100 Subject: [PATCH] Stop checking if GDK window is our own in GTK callbacks GTKIsOwnWindow() doesn't always return the correct result, i.e. it doesn't recognize all windows that a GTK widget is made of as being "ours", so checking for this resulted in wrongly ignoring some events. And this check doesn't seem to be actually necessary, as we shouldn't be ever called by GTK for the windows that are not ours, so just remove it. See #24245. --- src/gtk/window.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 0854f2bc8d..b9b2d7cef3 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1669,16 +1669,13 @@ bool wxWindowGTK::GTKShouldIgnoreEvent() const return g_blockEventsOnDrag; } -int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const +int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny* WXUNUSED(event)) const { if (g_blockEventsOnDrag) return TRUE; if (g_blockEventsOnScroll) return TRUE; - if (!GTKIsOwnWindow(event->window)) - return FALSE; - return -1; }