Create WXSendContextMenuEvent() helper function
Put common code from all the different ports into it. This is not very useful right now, but it will allow to change this function once, instead of applying the same change to all ports, in the upcoming commit.
This commit is contained in:
@@ -3636,8 +3636,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
|
||||
// the event may be handled by a parent window
|
||||
wxPoint pt(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
|
||||
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, GetId(), pt);
|
||||
|
||||
// we could have got an event from our child, reflect it back
|
||||
// to it if this is the case
|
||||
wxWindowMSW *win = NULL;
|
||||
@@ -3650,8 +3648,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
|
||||
if ( !win )
|
||||
win = this;
|
||||
|
||||
evtCtx.SetEventObject(win);
|
||||
processed = win->HandleWindowEvent(evtCtx);
|
||||
processed = win->WXSendContextMenuEvent(pt);
|
||||
|
||||
if ( !processed )
|
||||
{
|
||||
|
Reference in New Issue
Block a user