Tk Source Code

Check-in [b2b91450]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix bug [9771ae0f0b]: In Aqua, deiconifying a transient of a withdrawn window can create a zombie.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: b2b91450f8ec65e072e4e8f7b4d5473ed77da4d396430139408d1e180555d428
User & Date: culler 2019-02-23 21:16:45.424
Context
2019-03-01
04:01
Fix bug 1951abf33d: Aqua sometimes segfaults when destroying a transient. check-in: 8bfb7932 user: culler tags: core-8-6-branch
2019-02-27
23:22
Adding 1 character fixes two of the three crashes reported in ticket [1951abf33d] check-in: 46451724 user: culler tags: bug-1951abf33d
04:07
Update mac_services branch, intend to submit a TIP check-in: 3cb35aab user: kevin_walzer tags: mac_services
2019-02-24
17:08
Fix bug [0d63621b6c]: Aqua ttk uses incorrect background colors. check-in: a90a32fd user: culler tags: bug-0d63621b6c
2019-02-23
21:17
Fix bug [9771ae0f0b]: In Aqua, deiconifying a transient of a withdrawn window can create a zombie. check-in: 134513a8 user: culler tags: trunk
21:16
Fix bug [9771ae0f0b]: In Aqua, deiconifying a transient of a withdrawn window can create a zombie. check-in: b2b91450 user: culler tags: core-8-6-branch
05:44
Fix bug [9771ae0f0b]: In Aqua, deiconifying a transient of a withdrawn window can create a zombie Closed-Leaf check-in: 20029d1c user: culler tags: bug-9771ae0f0b
02:30
Fix bug [56a1823c73]: Aqua toplevels can fail to appear on screen. check-in: 5e709226 user: culler tags: core-8-6-branch
Changes
Unified Diff Ignore Whitespace Patch
Changes to macosx/tkMacOSXWm.c.
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884











6885
6886

6887
6888
6889
6890
6891
6892
6893
	    [macWindow setExcludedFromWindowsMenu:NO];
	    wmPtr->flags &= ~WM_TOPMOST;
	}
	if (wmPtr->master != None) {
	    TkDisplay *dispPtr = TkGetDisplayList();
	    TkWindow *masterWinPtr = (TkWindow *)
		    Tk_IdToWindow(dispPtr->display, wmPtr->master);

	    if (masterWinPtr && masterWinPtr->window != None &&
		    TkMacOSXHostToplevelExists(masterWinPtr)) {
		NSWindow *masterMacWin =
			TkMacOSXDrawableWindow(masterWinPtr->window);

		if (masterMacWin && masterMacWin != parentWindow &&
			(winPtr->flags & TK_MAPPED)) {
		    if (parentWindow) {
			[parentWindow removeChildWindow:macWindow];
		    }











		    [masterMacWin addChildWindow:macWindow
			    ordered:NSWindowAbove];

		    if (wmPtr->flags & WM_TOPMOST) {
			[macWindow setLevel:kCGUtilityWindowLevel];
		    }
		}
	    }
	} else if (parentWindow) {
	    [parentWindow removeChildWindow:macWindow];







<










>
>
>
>
>
>
>
>
>
>
>
|
|
>







6867
6868
6869
6870
6871
6872
6873

6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
	    [macWindow setExcludedFromWindowsMenu:NO];
	    wmPtr->flags &= ~WM_TOPMOST;
	}
	if (wmPtr->master != None) {
	    TkDisplay *dispPtr = TkGetDisplayList();
	    TkWindow *masterWinPtr = (TkWindow *)
		    Tk_IdToWindow(dispPtr->display, wmPtr->master);

	    if (masterWinPtr && masterWinPtr->window != None &&
		    TkMacOSXHostToplevelExists(masterWinPtr)) {
		NSWindow *masterMacWin =
			TkMacOSXDrawableWindow(masterWinPtr->window);

		if (masterMacWin && masterMacWin != parentWindow &&
			(winPtr->flags & TK_MAPPED)) {
		    if (parentWindow) {
			[parentWindow removeChildWindow:macWindow];
		    }
		    
		    /*
		     * A child NSWindow retains its relative position with
		     * respect to the parent when the parent is moved.  This is
		     * pointless if the parent is offscreen, and adding a child
		     * to an offscreen window causes the parent to be displayed
		     * as a zombie.  So we should only do this if the parent is
		     * visible.
		     */

		    if ([masterMacWin isVisible]) {
			[masterMacWin addChildWindow:macWindow
					     ordered:NSWindowAbove];
		    }
		    if (wmPtr->flags & WM_TOPMOST) {
			[macWindow setLevel:kCGUtilityWindowLevel];
		    }
		}
	    }
	} else if (parentWindow) {
	    [parentWindow removeChildWindow:macWindow];