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.
This commit is contained in:
Vadim Zeitlin 2024-02-18 17:47:57 +01:00
parent bbeaacd857
commit 28ba50fa45

View file

@ -1669,16 +1669,13 @@ bool wxWindowGTK::GTKShouldIgnoreEvent() const
return g_blockEventsOnDrag; return g_blockEventsOnDrag;
} }
int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny *event) const int wxWindowGTK::GTKCallbackCommonPrologue(GdkEventAny* WXUNUSED(event)) const
{ {
if (g_blockEventsOnDrag) if (g_blockEventsOnDrag)
return TRUE; return TRUE;
if (g_blockEventsOnScroll) if (g_blockEventsOnScroll)
return TRUE; return TRUE;
if (!GTKIsOwnWindow(event->window))
return FALSE;
return -1; return -1;
} }