X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b43914a8be2258de608a7127ac43f00b65631b15..aa926768a9329b4eb4804c89de8da2061549708d:/src/osx/carbon/nonownedwnd.cpp diff --git a/src/osx/carbon/nonownedwnd.cpp b/src/osx/carbon/nonownedwnd.cpp index cab04631f5..75077bc46e 100644 --- a/src/osx/carbon/nonownedwnd.cpp +++ b/src/osx/carbon/nonownedwnd.cpp @@ -51,6 +51,21 @@ void wxNonOwnedWindowCarbonImpl::Lower() ::SendBehind( m_macWindow , NULL ) ; } +void wxNonOwnedWindowCarbonImpl::ShowWithoutActivating() +{ + bool plainTransition = true; + +#if wxUSE_SYSTEM_OPTIONS + if ( wxSystemOptions::HasOption(wxMAC_WINDOW_PLAIN_TRANSITION) ) + plainTransition = ( wxSystemOptions::GetOptionInt( wxMAC_WINDOW_PLAIN_TRANSITION ) == 1 ) ; +#endif + + if ( plainTransition ) + ::ShowWindow( (WindowRef)m_macWindow ); + else + ::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL ); +} + bool wxNonOwnedWindowCarbonImpl::Show(bool show) { bool plainTransition = true; @@ -62,14 +77,8 @@ bool wxNonOwnedWindowCarbonImpl::Show(bool show) if (show) { -#if wxOSX_USE_CARBON - if ( plainTransition ) - ::ShowWindow( (WindowRef)m_macWindow ); - else - ::TransitionWindow( (WindowRef)m_macWindow, kWindowZoomTransitionEffect, kWindowShowTransitionAction, NULL ); - + ShowWithoutActivating(); ::SelectWindow( (WindowRef)m_macWindow ) ; -#endif } else { @@ -1669,6 +1678,11 @@ void wxNonOwnedWindowCarbonImpl::WindowToScreen( int *x, int *y ) *y = (int)p.y; } +bool wxNonOwnedWindowCarbonImpl::IsActive() +{ + return ActiveNonFloatingWindow() == m_macWindow; +} + wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) {