]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed obscure compilation problem at line 139
authorDavid Surovell <davids@osafoundation.org>
Tue, 13 Dec 2005 23:15:42 +0000 (23:15 +0000)
committerDavid Surovell <davids@osafoundation.org>
Tue, 13 Dec 2005 23:15:42 +0000 (23:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp

index bdcba53822524bd705874b87880580466a7b8a0b..2407ac63e4d7415e2a91fc2217b4bb054399efd9 100644 (file)
@@ -133,30 +133,32 @@ static pascal OSStatus TextInputEventHandler( EventHandlerCallRef handler , Even
     switch ( GetEventKind( event ) )
     {
         case kEventTextInputUnicodeForKeyEvent :
-            // this is only called when no default handler has jumped in, e.g. a wxControl on a floater window does not
-            // get its own kEventTextInputUnicodeForKeyEvent, so we reroute the event back to the control
-            wxControl* control = wxDynamicCast( focus , wxControl ) ;
-            if ( control )
             {
-                ControlRef macControl = (ControlRef) control->GetHandle() ;
-                if ( macControl )
+                // this is only called when no default handler has jumped in, e.g. a wxControl on a floater window does not
+                // get its own kEventTextInputUnicodeForKeyEvent, so we reroute the event back to the control
+                wxControl* control = wxDynamicCast( focus , wxControl ) ;
+                if ( control )
                 {
-                    ::HandleControlKey( macControl , keyCode , charCode , modifiers ) ;
-                    result = noErr ;
+                    ControlRef macControl = (ControlRef) control->GetHandle() ;
+                    if ( macControl )
+                    {
+                        ::HandleControlKey( macControl , keyCode , charCode , modifiers ) ;
+                        result = noErr ;
+                    }
                 }
-            }
 
 #if 0
-            // this may lead to double events sent to a window in case all handlers have skipped the key down event
-            UInt32 when = EventTimeToTicks( GetEventTime( event ) ) ;
-            UInt32 message = (keyCode << 8) + charCode;
+                // this may lead to double events sent to a window in case all handlers have skipped the key down event
+                UInt32 when = EventTimeToTicks( GetEventTime( event ) ) ;
+                UInt32 message = (keyCode << 8) + charCode;
 
-            if ( (focus != NULL) &&
-                wxTheApp->MacSendKeyDownEvent( focus , message , modifiers , when , point.h , point.v ) )
-            {
-                result = noErr ;
-            }
+                if ( (focus != NULL) &&
+                    wxTheApp->MacSendKeyDownEvent( focus , message , modifiers , when , point.h , point.v ) )
+                {
+                    result = noErr ;
+                }
 #endif
+            }
             break ;
 
         default: