fixing right click

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-04-13 05:21:31 +00:00
parent d85611ba84
commit 92a7272fdb

View File

@@ -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 ) ;
}