X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d7fa7eaa2dc8ef4154ac4d9d739bcfb6be1669ac..cb59313ce503d859beafb94025a1c6822f59dbd6:/src/gtk/listbox.cpp?ds=sidebyside diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 4eefc235d3..c63ba920e3 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -335,7 +335,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, { m_needParent = TRUE; m_acceptsFocus = TRUE; - m_isListBox = TRUE; m_prevSelection = 0; // or -1 ?? m_blockEvent = FALSE; @@ -1064,4 +1063,13 @@ wxSize wxListBox::DoGetBestSize() const return wxSize(lbWidth, lbHeight); } -#endif +void wxListBox::FixUpMouseEvent(GtkWidget *widget, wxCoord& x, wxCoord& y) +{ + // the mouse event coords are relative to the listbox items, we need to + // translate them to the normal client coords + x += widget->allocation.x; + y += widget->allocation.y; +} + +#endif // wxUSE_LISTBOX +