From 219708e5887ebfc86b489c5b4c0538cd7a7267ff Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 4 Nov 2007 21:49:53 +0000 Subject: [PATCH] frame tools without decorations are done using plainwindowclass, but this also must have a scope activation of none, otherwise the frame gets incorrectly deactivated git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/toplevel.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index b4eb9c4467..0c7591eb6f 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -1124,6 +1124,8 @@ void wxTopLevelWindowMac::DoMacCreateRealWindow( WindowClass wclass = 0; WindowAttributes attr = kWindowNoAttributes ; WindowGroupRef group = NULL ; + bool activationScopeSet = false; + WindowActivationScope activationScope = kWindowActivationScopeNone; if ( HasFlag( wxFRAME_TOOL_WINDOW) ) { @@ -1143,7 +1145,9 @@ void wxTopLevelWindowMac::DoMacCreateRealWindow( } else { - wclass = kPlainWindowClass ; + wclass = kPlainWindowClass; + activationScopeSet = true; + activationScope = kWindowActivationScopeNone; } } else if ( HasFlag( wxPOPUP_WINDOW ) ) @@ -1256,6 +1260,11 @@ void wxTopLevelWindowMac::DoMacCreateRealWindow( verify_noerr( SetWindowGroupParent( overlaygroup, GetWindowGroup( (WindowRef) m_macWindow ))); verify_noerr( SetWindowGroup( (WindowRef) m_macWindow , overlaygroup )); + if ( activationScopeSet ) + { + verify_noerr( SetWindowActivationScope( (WindowRef) m_macWindow , activationScope )); + } + // the create commands are only for content rect, // so we have to set the size again as structure bounds SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;