summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 3a1da10..68cbb00 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -1657,14 +1657,16 @@ WmForgetCmd(
macWin = (MacDrawable *) winPtr->window;
TkFocusJoin(winPtr);
- Tk_UnmapWindow(frameWin);
+ Tk_UnmapWindow(frameWin);
+ macWin->toplevel->referenceCount--;
macWin->toplevel = winPtr->parentPtr->privatePtr->toplevel;
+ macWin->toplevel->referenceCount++;
macWin->flags &= ~TK_HOST_EXISTS;
TkWmDeadWindow(winPtr);
RemapWindows(winPtr, (MacDrawable *) winPtr->parentPtr->window);
-
+
winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
/*
@@ -2448,7 +2450,9 @@ WmManageCmd(
}
wmPtr = winPtr->wmInfoPtr;
winPtr->flags &= ~TK_MAPPED;
+ macWin->toplevel->referenceCount--;
macWin->toplevel = macWin;
+ macWin->toplevel->referenceCount++;
RemapWindows(winPtr, macWin);
winPtr->flags |=
(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED);
@@ -5328,7 +5332,7 @@ WmWinStyle(
ApplyWindowAttributeFlagChanges(winPtr, NULL, oldAttributes, oldFlags,
0, 1);
-
+
return TCL_OK;
badClassAttrs:
@@ -5492,8 +5496,8 @@ TkMacOSXMakeRealWindowExist(
*/
[window setMovableByWindowBackground:NO];
}
-
-
+
+
/* Set background color and opacity of window if those flags are set. */
if (colorName != NULL) {
[window setBackgroundColor: colorName];
@@ -5502,7 +5506,7 @@ TkMacOSXMakeRealWindowExist(
if (opaqueTag != NULL) {
[window setOpaque: opaqueTag];
}
-
+
[window setDocumentEdited:NO];
wmPtr->window = window;
macWin->view = contentView;
@@ -6391,7 +6395,7 @@ TkMacOSXMakeFullscreen(
| NSApplicationPresentationAutoHideMenuBar];
} else {
- wmPtr->flags &= ~WM_FULLSCREEN;
+ wmPtr->flags &= ~WM_FULLSCREEN;
[NSApp setPresentationOptions: prevPres];
[window setStyleMask: prevMask];
@@ -6599,7 +6603,9 @@ RemapWindows(
if (winPtr->window != None) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
+ macWin->toplevel->referenceCount--;
macWin->toplevel = parentWin->toplevel;
+ macWin->toplevel->referenceCount++;
winPtr->flags &= ~TK_MAPPED;
#ifdef TK_REBUILD_TOPLEVEL
winPtr->flags |= TK_REBUILD_TOPLEVEL;