]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
Fix docs for Bind
[wxWidgets.git] / src / mac / carbon / window.cpp
index 2cead606f95bac1a4efcfc41e2a59b83387ab967..7f8c55e784bd713f2738bbfb32581d65a196eaaf 100644 (file)
@@ -35,6 +35,7 @@
 #include "wx/spinctrl.h"
 #include "wx/log.h"
 #include "wx/geometry.h"
+#include "wx/textctrl.h"
 
 #include "wx/toolbar.h"
 #include "wx/dc.h"
@@ -51,6 +52,8 @@
 #ifndef __DARWIN__
 #include <Windows.h>
 #include <ToolUtils.h>
+#include <Scrap.h>
+#include <MacTextEditor.h>
 #endif
 
 #if TARGET_API_MAC_OSX
@@ -209,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
                 {
@@ -226,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 ;
@@ -305,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 ;
             }