X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/edddffb58b1b0f569814ce706ae7b130151cd46a..a2dd2ea753f431b08ba4119d67ba90f6ca5e3966:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 07a1dff83e..4e49115d1a 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3028,8 +3028,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); } return; } @@ -3106,8 +3111,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 {