From 9957b90c387d7fbfff18ce9c4a4ebce9f8de3c5e Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 16 Sep 2012 14:59:38 +0000 Subject: Work in progress - make TkWmNewWindow and TkWmDeadWindow more complementary and pass in to TkWmDeadWindow from WmForgetCmd a pointer that at least has the right type. --- macosx/tkMacOSXWm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index b651b3c..267af7d 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -726,6 +726,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); } @@ -1650,7 +1653,7 @@ WmForgetCmd( TkFocusJoin(winPtr); Tk_UnmapWindow(frameWin); - TkWmDeadWindow((TkWindow *) macWin); + TkWmDeadWindow(winPtr); RemapWindows(winPtr, macWin); winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED); -- cgit v0.12 From 6d8383d0d6757ecd4ed865447bfa551690ed7323 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 16 Sep 2012 22:11:48 +0000 Subject: More work in progress. wm-manage tests all work now. still some issues with wm-forget. --- macosx/tkMacOSXWm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 267af7d..f5aefef 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1649,12 +1649,16 @@ WmForgetCmd( register Tk_Window frameWin = (Tk_Window) winPtr; if (Tk_IsTopLevel(frameWin)) { - MacDrawable *macWin = (MacDrawable *) winPtr->parentPtr->window; + MacDrawable *macWin = (MacDrawable *) winPtr->window; TkFocusJoin(winPtr); Tk_UnmapWindow(frameWin); + + macWin->toplevel = winPtr->parentPtr->privatePtr->toplevel; + macWin->flags &= ~TK_HOST_EXISTS; + TkWmDeadWindow(winPtr); - RemapWindows(winPtr, macWin); + RemapWindows(winPtr, (MacDrawable *) winPtr->parentPtr->window); winPtr->flags &= ~(TK_TOP_HIERARCHY|TK_TOP_LEVEL|TK_HAS_WRAPPER|TK_WIN_MANAGED); -- cgit v0.12 From 0ea7d71c4905741e8b990a41ac36ab8a762d9ac5 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 16 Sep 2012 22:36:20 +0000 Subject: Updated branch now stops all segfaults and panics in the test suite. Not a lot of confidence that other problems haven't been created, including memleaks and broken functionality in areas. A review would be a good idea. So would a trunk that doesn't segfault the test suite. --- macosx/tkMacOSXWm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index f5aefef..3a1da10 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -1649,7 +1649,12 @@ WmForgetCmd( register Tk_Window frameWin = (Tk_Window) winPtr; if (Tk_IsTopLevel(frameWin)) { - MacDrawable *macWin = (MacDrawable *) winPtr->window; + MacDrawable *macWin; + + Tk_MakeWindowExist(winPtr); + Tk_MakeWindowExist(winPtr->parentPtr); + + macWin = (MacDrawable *) winPtr->window; TkFocusJoin(winPtr); Tk_UnmapWindow(frameWin); -- cgit v0.12