]> git.saurik.com Git - wxWidgets.git/commitdiff
rewire char events in case there is no focusable control on a tlw
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 19 Mar 2006 10:55:09 +0000 (10:55 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 19 Mar 2006 10:55:09 +0000 (10:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/toplevel.cpp

index c4cd59574e1a60448f864b90916b226643c7ea43..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 } ,
@@ -795,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 ;