diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 1ea2442ffa..73773de48c 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5467,6 +5467,12 @@ wxColour wxGenericListCtrl::GetForegroundColour() const bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y ) { #if wxUSE_MENUS + // Coordinates here are given in this control coordinates system, but + // PopupMenu() wants them in the coordinates system of the window it's + // called on, so transform them. + ClientToScreen(&x, &y); + m_mainWin->ScreenToClient(&x, &y); + return m_mainWin->PopupMenu( menu, x, y ); #else return false;