X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4727773a688e990658dd9179d347b15ad9a1d3e..04633c190f5a6eafe607a5712647aaa131522b1f:/src/mac/carbon/window.cpp diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 2cead606f9..7f8c55e784 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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 #include +#include +#include #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 ; }