]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/toplevel.cpp
workaround for mingw 3.2.3 DLL build with wxUSE_STL=1
[wxWidgets.git] / src / mac / carbon / toplevel.cpp
index 7a58cf75068075c8fe4d06bbce9449fdc4faa6b8..e176c02796137e26f15a41d33d2d1d71d2f5173b 100644 (file)
@@ -86,13 +86,15 @@ extern long wxMacTranslateKey(unsigned char key, unsigned char code) ;
 static const EventTypeSpec eventList[] =
 {
     // TODO: remove control related event like key and mouse (except for WindowLeave events)
-#if 1
+
     { kEventClassKeyboard, kEventRawKeyDown } ,
     { kEventClassKeyboard, kEventRawKeyRepeat } ,
     { kEventClassKeyboard, kEventRawKeyUp } ,
     { kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
-#endif
 
+    { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
+    { kEventClassTextInput, kEventTextInputUpdateActiveInputArea } ,
+    
     { kEventClassWindow , kEventWindowShown } ,
     { kEventClassWindow , kEventWindowActivated } ,
     { kEventClassWindow , kEventWindowDeactivated } ,
@@ -497,6 +499,10 @@ pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , Ev
 #endif
                 }
             }
+
+            // disabled windows must not get any input messages
+            if ( currentMouseWindow && !currentMouseWindow->MacIsReallyEnabled() )
+                currentMouseWindow = NULL;
         }
     }
 
@@ -791,12 +797,19 @@ static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef hand
     return result ;
 }
 
+// mix this in from window.cpp
+pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
+
 pascal OSStatus wxMacTopLevelEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
 {
     OSStatus result = eventNotHandledErr ;
 
     switch ( GetEventClass( event ) )
     {
+        case kEventClassTextInput :
+            result = wxMacUnicodeTextEventHandler( handler, event , data ) ;
+            break ;
+
         case kEventClassKeyboard :
             result = KeyboardEventHandler( handler, event , data ) ;
             break ;