X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d66c3960d541cf9e3ba10519a49a9e34b4ddfc81..ee658398812ab334b39a2632cd99e2ffe6d4bc79:/src/mac/toplevel.cpp diff --git a/src/mac/toplevel.cpp b/src/mac/toplevel.cpp index 7541500cfc..67a8669f69 100644 --- a/src/mac/toplevel.cpp +++ b/src/mac/toplevel.cpp @@ -91,6 +91,7 @@ static const EventTypeSpec eventList[] = { kEventClassKeyboard, kEventRawKeyUp } , { kEventClassKeyboard, kEventRawKeyModifiersChanged } , + { kEventClassWindow , kEventWindowShown } , { kEventClassWindow , kEventWindowUpdate } , { kEventClassWindow , kEventWindowActivated } , { kEventClassWindow , kEventWindowDeactivated } , @@ -368,6 +369,10 @@ static pascal OSStatus WindowEventHandler( EventHandlerCallRef handler , EventRe toplevelWindow->MacActivate( EventTimeToTicks( GetEventTime( event ) ) , false) ; result = noErr ; break ; + case kEventWindowShown : + toplevelWindow->Refresh() ; + result = noErr ; + break ; case kEventWindowClose : toplevelWindow->Close() ; result = noErr ; @@ -727,12 +732,16 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, attr |= kWindowCloseBoxAttribute ; } - attr |= kWindowLiveResizeAttribute; //turn on live resizing - + if (UMAGetSystemVersion() >= 0x1000) + { + //turn on live resizing (OS X only) + attr |= kWindowLiveResizeAttribute; + } + #if TARGET_CARBON #if 0 // having problems right now with that if (HasFlag(wxSTAY_ON_TOP)) - wclass = kUtilityWindowClass; + wclass = kUtilityWindowClass; #endif #endif @@ -770,7 +779,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") ); wxAssociateWinWithMacWindow( m_macWindow , this ) ; - UMASetWTitle( (WindowRef)m_macWindow , title ) ; + UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ; if ( wxTopLevelWindowMac::s_macWindowCompositing ) { ::GetRootControl( (WindowRef)m_macWindow, (ControlHandle*)&m_macRootControl ) ; @@ -1078,7 +1087,7 @@ void wxTopLevelWindowMac::MacKeyDown( WXEVENTREF ev ) void wxTopLevelWindowMac::SetTitle(const wxString& title) { wxWindow::SetTitle( title ) ; - UMASetWTitle( (WindowRef)m_macWindow , title ) ; + UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ; } bool wxTopLevelWindowMac::Show(bool show)