From: Stefan Csomor Date: Tue, 10 Oct 2006 18:51:55 +0000 (+0000) Subject: using separate window groups per window helps keeping overlays with the window X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/832f330f225b4909ec9565096528f26a2db332fd using separate window groups per window helps keeping overlays with the window git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41907 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 8d279e9599..6a5284d6da 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -1173,6 +1173,11 @@ void wxTopLevelWindowMac::MacCreateRealWindow( wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") ); + // setup a separate group for each window, so that overlays can be handled easily + verify_noerr( CreateWindowGroup( kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrHideOnCollapse, &group )); + verify_noerr( SetWindowGroupParent( group, GetWindowGroup( (WindowRef) m_macWindow ))); + verify_noerr( SetWindowGroup( (WindowRef) m_macWindow , group )); + // 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 ) ;