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;