From bdf895fdd93d3f33a4b12a2c4a8568b64badc1d3 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Thu, 19 Oct 2006 00:22:11 +0000 Subject: [PATCH] Allow other classes to access the SetupMouseEvent function. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toplevel.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index e18ed8044b..6903a408f8 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -248,9 +248,9 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event wxWindow* g_MacLastWindow = NULL ; -static EventMouseButton lastButton = 0 ; +EventMouseButton g_lastButton = 0 ; -static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) +void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) { UInt32 modifiers = cEvent.GetParameter(kEventParamKeyModifiers, typeUInt32) ; Point screenMouseLocation = cEvent.GetParameter(kEventParamMouseLocation) ; @@ -274,19 +274,19 @@ static void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent ) button = kEventMouseButtonSecondary ; // otherwise we report double clicks by connecting a left click with a ctrl-left click - if ( clickCount > 1 && button != lastButton ) + if ( clickCount > 1 && button != g_lastButton ) clickCount = 1 ; // we must make sure that our synthetic 'right' button corresponds in // mouse down, moved and mouse up, and does not deliver a right down and left up if ( cEvent.GetKind() == kEventMouseDown ) - lastButton = button ; + g_lastButton = button ; if ( button == 0 ) - lastButton = 0 ; - else if ( lastButton ) - button = lastButton ; + g_lastButton = 0 ; + else if ( g_lastButton ) + button = g_lastButton ; // determine the correct down state, wx does not want a 'down' for a mouseUp event, // while mac delivers this button -- 2.45.2