X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c..beee38cb41aa2ce4fbe9052bf4f70e1be184b553:/src/osx/carbon/window.cpp diff --git a/src/osx/carbon/window.cpp b/src/osx/carbon/window.cpp index 831217ef94..aa7fc3fd34 100644 --- a/src/osx/carbon/window.cpp +++ b/src/osx/carbon/window.cpp @@ -585,7 +585,7 @@ wxMacWindowServiceEventHandler(EventHandlerCallRef WXUNUSED(handler), return result ; } -pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) +WXDLLEXPORT pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) { OSStatus result = eventNotHandledErr ; wxWindowMac* focus = (wxWindowMac*) data ; @@ -610,14 +610,9 @@ pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , Even uniChars = new wchar_t[ numChars ] ; GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ; charBuf[ numChars - 1 ] = 0; -#if SIZEOF_WCHAR_T == 2 - uniChars = (wchar_t*) charBuf ; -/* memcpy( uniChars , charBuf , numChars * 2 ) ;*/ // is there any point in copying charBuf over itself? (in fact, memcpy isn't even guaranteed to work correctly if the source and destination ranges overlap...) -#else // the resulting string will never have more chars than the utf16 version, so this is safe wxMBConvUTF16 converter ; numChars = converter.MB2WC( uniChars , (const char*)charBuf , numChars ) ; -#endif } switch ( GetEventKind( event ) ) @@ -841,7 +836,7 @@ wxWidgetImplType* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, { OSStatus err = noErr; Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; - wxMacControl* c = new wxMacControl(wxpeer) ; + wxMacControl* c = new wxMacControl(wxpeer, false, true) ; UInt32 features = 0 | kControlSupportsEmbedding | kControlSupportsLiveFeedback @@ -873,8 +868,8 @@ wxMacControl::wxMacControl() Init(); } -wxMacControl::wxMacControl(wxWindowMac* peer , bool isRootControl ) : - wxWidgetImpl( peer, isRootControl ) +wxMacControl::wxMacControl(wxWindowMac* peer , bool isRootControl, bool isUserPane ) : + wxWidgetImpl( peer, isRootControl, isUserPane ) { Init(); }