From fc8a780932e6672646838b0c828626d63e04ffac Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 28 Dec 2023 12:32:59 -0800 Subject: [PATCH] Avoid applying "no-window" mouse coordinate conversion to generic wxWindow For a wxPizza widget in a GtkScrolledWindow, the coordinates are already correct. --- include/wx/gtk/private/event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/gtk/private/event.h b/include/wx/gtk/private/event.h index 851fd93710..9811422df3 100644 --- a/include/wx/gtk/private/event.h +++ b/include/wx/gtk/private/event.h @@ -62,7 +62,7 @@ template void InitMouseEvent(wxWindowGTK *win, // Some no-window widgets, notably GtkEntry on GTK3, have a GdkWindow // covering part of their area. Event coordinates from that window are // not relative to the widget, so do the conversion here. - if (!gtk_widget_get_has_window(win->m_widget) && + if (win->m_wxwindow == nullptr && !gtk_widget_get_has_window(win->m_widget) && gtk_widget_get_window(win->m_widget) == gdk_window_get_parent(gdk_event->window)) { GtkAllocation a;