Avoid applying "no-window" mouse coordinate conversion to generic wxWindow

For a wxPizza widget in a GtkScrolledWindow, the coordinates are already correct.
This commit is contained in:
Paul Cornett 2023-12-28 12:32:59 -08:00
parent 6cb6cf1fde
commit fc8a780932

View file

@ -62,7 +62,7 @@ template<typename T> void InitMouseEvent(wxWindowGTK *win,
// Some no-window widgets, notably GtkEntry on GTK3, have a GdkWindow // Some no-window widgets, notably GtkEntry on GTK3, have a GdkWindow
// covering part of their area. Event coordinates from that window are // covering part of their area. Event coordinates from that window are
// not relative to the widget, so do the conversion here. // 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)) gtk_widget_get_window(win->m_widget) == gdk_window_get_parent(gdk_event->window))
{ {
GtkAllocation a; GtkAllocation a;