Skipping Right_down event if generated context menu event is not handled

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-04-15 17:07:27 +00:00
parent 753f2cb491
commit 249aad307f
2 changed files with 6 additions and 4 deletions

View File

@@ -2084,7 +2084,7 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
if ( event.GetEventType() == wxEVT_RIGHT_DOWN ) if ( event.GetEventType() == wxEVT_RIGHT_DOWN )
{ {
// copied from wxGTK : CS // copied from wxGTK : CS
// generate a "context menu" event: this is similar to wxEVT_RIGHT_UP // generate a "context menu" event: this is similar to wxEVT_RIGHT_DOWN
// except that: // except that:
// //
// (a) it's a command event and so is propagated to the parent // (a) it's a command event and so is propagated to the parent
@@ -2093,7 +2093,8 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU,
this->GetId(), this->GetId(),
this->ClientToScreen(event.GetPosition())); this->ClientToScreen(event.GetPosition()));
this->GetEventHandler()->ProcessEvent(evtCtx); if ( ! GetEventHandler()->ProcessEvent(evtCtx) )
event.Skip() ;
} }
else else
{ {

View File

@@ -2084,7 +2084,7 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
if ( event.GetEventType() == wxEVT_RIGHT_DOWN ) if ( event.GetEventType() == wxEVT_RIGHT_DOWN )
{ {
// copied from wxGTK : CS // copied from wxGTK : CS
// generate a "context menu" event: this is similar to wxEVT_RIGHT_UP // generate a "context menu" event: this is similar to wxEVT_RIGHT_DOWN
// except that: // except that:
// //
// (a) it's a command event and so is propagated to the parent // (a) it's a command event and so is propagated to the parent
@@ -2093,7 +2093,8 @@ void wxWindowMac::OnMouseEvent( wxMouseEvent &event )
wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU, wxContextMenuEvent evtCtx(wxEVT_CONTEXT_MENU,
this->GetId(), this->GetId(),
this->ClientToScreen(event.GetPosition())); this->ClientToScreen(event.GetPosition()));
this->GetEventHandler()->ProcessEvent(evtCtx); if ( ! GetEventHandler()->ProcessEvent(evtCtx) )
event.Skip() ;
} }
else else
{ {