summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkevin_walzer <kevin_walzer@noemail.net>2012-10-18 02:46:11 (GMT)
committerkevin_walzer <kevin_walzer@noemail.net>2012-10-18 02:46:11 (GMT)
commit26aced2b02dbe6d8c1ddbd06cd08f8d4719e7b6d (patch)
tree7481523b49f5e6d80031f8c21720a28537545c34
parent7a8a56429b9c53cbaf03264843f3a9d78830976b (diff)
downloadtk-26aced2b02dbe6d8c1ddbd06cd08f8d4719e7b6d.zip
tk-26aced2b02dbe6d8c1ddbd06cd08f8d4719e7b6d.tar.gz
tk-26aced2b02dbe6d8c1ddbd06cd08f8d4719e7b6d.tar.bz2
Backport of dgp wm-forget and wm-manage fixes; test suite no longer crashes
FossilOrigin-Name: 336d7df9cb591c282737ff3529aede1c8fea5257
-rw-r--r--macosx/tkMacOSXWm.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index e56c0e7..9967581 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -728,6 +728,9 @@ TkWmDeadWindow(
if (wmPtr == NULL) {
return;
}
+ Tk_ManageGeometry((Tk_Window) winPtr, NULL, NULL);
+ Tk_DeleteEventHandler((Tk_Window) winPtr, StructureNotifyMask,
+ TopLevelEventProc, winPtr);
if (wmPtr->hints.flags & IconPixmapHint) {
Tk_FreeBitmap(winPtr->display, wmPtr->hints.icon_pixmap);
}
@@ -1641,14 +1644,22 @@ WmForgetCmd(
if (Tk_IsTopLevel(frameWin)) {
- MacDrawable *macWin;
- Tk_MakeWindowExist(winPtr);
- Tk_MakeWindowExist(winPtr->parentPtr); macWin = (MacDrawable *) winPtr->window;
+ MacDrawable *macWin;
+
+ Tk_MakeWindowExist(winPtr);
+ Tk_MakeWindowExist(winPtr->parentPtr);
+
+ macWin = (MacDrawable *) winPtr->window;
+
TkFocusJoin(winPtr);
Tk_UnmapWindow(frameWin);
- TkWmDeadWindow(macWin);
- RemapWindows(winPtr, macWin);
-
+
+ macWin->toplevel = winPtr->parentPtr->privatePtr->toplevel;
+ 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);
/*