diff options
author | das <das> | 2007-12-18 18:21:29 (GMT) |
---|---|---|
committer | das <das> | 2007-12-18 18:21:29 (GMT) |
commit | 6e391d9802c67240e368a746b5a60d006bf08812 (patch) | |
tree | 9955e412e61973061382f7bcd8b31ce10831c4e2 /macosx/tkMacOSXSubwindows.c | |
parent | c0dee56349bd0f83c724eb0aa48814cc2c51b9b8 (diff) | |
download | tk-6e391d9802c67240e368a746b5a60d006bf08812.zip tk-6e391d9802c67240e368a746b5a60d006bf08812.tar.gz tk-6e391d9802c67240e368a746b5a60d006bf08812.tar.bz2 |
* macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): Revert 2007-10-26
change to window class of transient toplevels that are not also
overrideredirect. [Bug 1845899]
* macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): Implement more
* macosx/tkMacOSXMouseEvent.c (BringWindowForward): X11-like transient
* macosx/tkMacOSXSubwindows.c (XDestroyWindow): behaviour by adding
transient windows to a window group owned by the master window, this
ensures transients always remain in front of and are collapsed with the
master; bring master to front when selecting transient windows; restore
default window group of transients if master destroyed. [Bug 1845899]
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index c06dbda..0b46f7c 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.21 2007/11/09 06:26:56 das Exp $ + * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.2.2.22 2007/12/18 18:21:31 das Exp $ */ #include "tkMacOSXPrivate.h" @@ -109,7 +109,42 @@ XDestroyWindow( if (winRef) { TkMacOSXWindowList *listPtr, *prevPtr; + WindowGroupRef group; + + if (GetWindowProperty(winRef, 'Tk ', 'TsGp', sizeof(group), + NULL, &group) == noErr) { + TkDisplay *dispPtr = TkGetDisplayList(); + ItemCount i = CountWindowGroupContents(group, + kWindowGroupContentsReturnWindows); + + while (i > 0) { + WindowRef macWin; + + ChkErr(GetIndexedWindow, group, i--, 0, &macWin); + if (macWin) { + WindowGroupRef newGroup = NULL; + Window window = TkMacOSXGetXWindow(macWin); + + if (window != None) { + TkWindow * winPtr = (TkWindow *)Tk_IdToWindow( + dispPtr->display, window); + + if (winPtr && winPtr->wmInfoPtr) { + newGroup = GetWindowGroupOfClass( + winPtr->wmInfoPtr->macClass); + } + } + if (!newGroup) { + newGroup = GetWindowGroupOfClass( + kDocumentWindowClass); + } + ChkErr(SetWindowGroup, macWin, newGroup); + } + } + ChkErr(SetWindowGroupOwner, group, NULL); + ChkErr(ReleaseWindowGroup, group); + } TkMacOSXUnregisterMacWindow(winRef); DisposeWindow(winRef); |