diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index fd760ab7e9..fb5e60e8a5 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3105,8 +3105,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) if (event.RightDown()) { SendNotify( (size_t) -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); - // Allow generation of context menu event - event.Skip(); + + wxContextMenuEvent evtCtx( + wxEVT_CONTEXT_MENU, + GetParent()->GetId(), + ClientToScreen(event.GetPosition())); + evtCtx.SetEventObject(GetParent()); + GetParent()->GetEventHandler()->ProcessEvent(evtCtx); } else { @@ -3193,8 +3198,12 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) SendNotify( current, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); - // Allow generation of context menu event - event.Skip(); + wxContextMenuEvent evtCtx( + wxEVT_CONTEXT_MENU, + GetParent()->GetId(), + ClientToScreen(event.GetPosition())); + evtCtx.SetEventObject(GetParent()); + GetParent()->GetEventHandler()->ProcessEvent(evtCtx); } else if (event.MiddleDown()) {