X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1f90939c20191d232dc7d3844f3620595a934fa5..79a73b4f86090278c242a8cca5fd9147a31a4419:/src/mac/carbon/toplevel.cpp diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 70d0f1e348..67a8669f69 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -1,11 +1,11 @@ /////////////////////////////////////////////////////////////////////////////// // Name: mac/toplevel.cpp -// Purpose: implements wxTopLevelWindow for MSW -// Author: Vadim Zeitlin +// Purpose: implements wxTopLevelWindow for Mac +// Author: Stefan Csomor // Modified by: // Created: 24.09.01 // RCS-ID: $Id$ -// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Copyright: (c) 2001-2004 Stefan Csomor // License: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -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,24 +732,30 @@ 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 //this setup lets us have compositing and non-compositing //windows in the same application. - + +#if UNIVERSAL_INTERFACES_VERSION >= 0x0400 if ( wxTopLevelWindowMac::s_macWindowCompositing ) { attr |= kWindowCompositingAttribute; m_macUsesCompositing = TRUE; } else +#endif { m_macUsesCompositing = FALSE; } @@ -768,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 ) ; @@ -1076,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)