]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/nonownedwnd.cpp
Fix for incorrect programmatic formatting (default style set immediately if not using...
[wxWidgets.git] / src / osx / carbon / nonownedwnd.cpp
index 66c0f90d92122b09e69ac3522ca01454d24effae..909e6a3ad1fdc553873a81719e93dd377cdf72eb 100644 (file)
@@ -323,17 +323,13 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
         GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ;
         charBuf[ numChars - 1 ] = 0;
 
-#if SIZEOF_WCHAR_T == 2
-        uniChar = charBuf[0] ;
-#else
         wxMBConvUTF16 converter ;
         converter.MB2WC( uniChar , (const char*)charBuf , 2 ) ;
-#endif
 
         if ( numChars * 2 > 4 )
             delete[] charBuf ;
     }
-#endif
+#endif // wxUSE_UNICODE
 
     GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode );
     GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode );
@@ -722,8 +718,8 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
 
         if ( currentMouseWindow->HandleWindowEvent(wxevent) )
         {
-            if ((currentMouseWindowParent != NULL) &&
-                (currentMouseWindowParent->GetChildren().Find(currentMouseWindow) == NULL))
+            if ( currentMouseWindowParent &&
+                 !currentMouseWindowParent->GetChildren().Member(currentMouseWindow) )
                 currentMouseWindow = NULL;
 
             result = noErr;