X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34952e03e27f4d9b0eb255752678c79b29575a18..7368be43c35fbdfc5cecb190a5d299f173866b37:/src/mac/carbon/toplevel.cpp?ds=sidebyside diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index d598bf9833..114194804f 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -157,7 +157,12 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event { OSStatus result = eventNotHandledErr ; + wxTopLevelWindow* tlw = (wxTopLevelWindow*) data ; + wxWindow* focus = wxWindow::FindFocus() ; + if ( focus == NULL ) + return result ; + char charCode ; UInt32 keyCode ; UInt32 modifiers ; @@ -294,7 +299,7 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) if ( button == kEventMouseButtonSecondary ) { if (cEvent.GetKind() == kEventMouseDown ) - wxevent.SetEventType( clickCount > 1 ? wxEVT_RIGHT_DOWN : wxEVT_RIGHT_DCLICK ) ; + wxevent.SetEventType( clickCount > 1 ? wxEVT_RIGHT_DCLICK : wxEVT_RIGHT_DOWN ) ; else if ( cEvent.GetKind() == kEventMouseUp ) wxevent.SetEventType(wxEVT_RIGHT_UP ) ; }