]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
Fix docs for Bind
[wxWidgets.git] / src / mac / carbon / window.cpp
index b5f98056e438d291f4840ca7011ec6ab2f26e365..7f8c55e784bd713f2738bbfb32581d65a196eaaf 100644 (file)
@@ -52,6 +52,8 @@
 #ifndef __DARWIN__
 #include <Windows.h>
 #include <ToolUtils.h>
+#include <Scrap.h>
+#include <MacTextEditor.h>
 #endif
 
 #if TARGET_API_MAC_OSX
@@ -210,6 +212,8 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
                     wxFocusEvent event(wxEVT_KILL_FOCUS, thisWindow->GetId());
                     event.SetEventObject(thisWindow);
                     thisWindow->GetEventHandler()->ProcessEvent(event) ;
+                    if (thisWindow->MacIsUserPane())
+                        result = noErr;
                 }
                 else
                 {
@@ -227,6 +231,8 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
                     wxFocusEvent event(wxEVT_SET_FOCUS, thisWindow->GetId());
                     event.SetEventObject(thisWindow);
                     thisWindow->GetEventHandler()->ProcessEvent(event) ;
+                    if (thisWindow->MacIsUserPane())
+                        result = noErr;
                 }
             }
             break ;
@@ -306,7 +312,11 @@ static pascal OSStatus wxMacWindowServiceEventHandler( EventHandlerCallRef handl
                 char *content = new char[textSize] ;
                 GetScrapFlavorData (scrapRef, kTXNTextData, &pastedSize, content );  
                 content[textSize-1] = 0 ;
+#if wxUSE_UNICODE
+                textCtrl->WriteText( wxString( content , wxConvLocal )  );
+#else
                 textCtrl->WriteText( wxString( content ) ) ;
+#endif
                 delete[] content ;
                 result = noErr ;
             }