From 92a7272fdb8da914f8604c2b66a72a595b09ca77 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 13 Apr 2004 05:21:31 +0000 Subject: [PATCH] fixing right click git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toplevel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ) ; } -- 2.45.2