diff options
author | hobbs <hobbs> | 2006-05-29 22:21:39 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2006-05-29 22:21:39 (GMT) |
commit | de94051cc9cefddb0cfae707598416939eabe5b8 (patch) | |
tree | ffc2567e249c5475bbb460da90068f7b83331815 | |
parent | a7c8588873469c05f9182cd88d68fce9eec6ebe5 (diff) | |
download | tk-de94051cc9cefddb0cfae707598416939eabe5b8.zip tk-de94051cc9cefddb0cfae707598416939eabe5b8.tar.gz tk-de94051cc9cefddb0cfae707598416939eabe5b8.tar.bz2 |
* win/tkWinEmbed.c (TkpGetOtherWindow): [Bug 1212056] do not panic
* unix/tkUnixEmbed.c (TkpGetOtherWindow): if no window is found -
* unix/tkUnixWm.c (Tk_CoordsToWindow, UpdateGeometryInfo): handle it
in the caller
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | unix/tkUnixEmbed.c | 3 | ||||
-rw-r--r-- | unix/tkUnixWm.c | 12 | ||||
-rw-r--r-- | win/tkWinEmbed.c | 3 |
4 files changed, 16 insertions, 7 deletions
@@ -1,5 +1,10 @@ 2006-05-29 Jeff Hobbs <jeffh@ActiveState.com> + * win/tkWinEmbed.c (TkpGetOtherWindow): [Bug 1212056] do not panic + * unix/tkUnixEmbed.c (TkpGetOtherWindow): if no window is found - + * unix/tkUnixWm.c (Tk_CoordsToWindow, UpdateGeometryInfo): handle it + in the caller + * tests/entry.test (entry-22.1): * tests/listbox.test (listbox-6.15): * generic/tkListbox.c (ListboxInsertSubCmd, ListboxDeleteSubCmd): diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c index a74ed83..c06cbdc 100644 --- a/unix/tkUnixEmbed.c +++ b/unix/tkUnixEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixEmbed.c,v 1.9 2005/11/14 11:54:21 dkf Exp $ + * RCS: @(#) $Id: tkUnixEmbed.c,v 1.10 2006/05/29 22:21:40 hobbs Exp $ */ #include "tkInt.h" @@ -717,7 +717,6 @@ TkpGetOtherWindow( return containerPtr->embeddedPtr; } } - Tcl_Panic("TkpGetOtherWindow couldn't find window"); return NULL; } diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index e79b5b1..ee43db5 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixWm.c,v 1.50 2005/11/16 02:51:38 jenglish Exp $ + * RCS: @(#) $Id: tkUnixWm.c,v 1.51 2006/05/29 22:21:40 hobbs Exp $ */ #include "tkPort.h" @@ -4457,6 +4457,8 @@ UpdateGeometryInfo( if ((winPtr->flags & (TK_EMBEDDED|TK_BOTH_HALVES)) == (TK_EMBEDDED|TK_BOTH_HALVES)) { + TkWindow *childPtr = TkpGetOtherWindow(winPtr); + /* * This window is embedded and the container is also in this process, * so we don't need to do anything special about the geometry, except @@ -4468,8 +4470,9 @@ UpdateGeometryInfo( wmPtr->x = wmPtr->y = 0; wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y); height += wmPtr->menuHeight; - Tk_GeometryRequest((Tk_Window) TkpGetOtherWindow(winPtr), - width, height); + if (childPtr != NULL) { + Tk_GeometryRequest((Tk_Window) childPtr, width, height); + } return; } serial = NextRequest(winPtr->display); @@ -5576,6 +5579,9 @@ Tk_CoordsToWindow( */ winPtr = TkpGetOtherWindow(winPtr); + if (winPtr == NULL) { + return NULL; + } wmPtr = winPtr->wmInfoPtr; childX = x; childY = y; diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index 71f8116..b8b0b1e 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinEmbed.c,v 1.30 2005/12/02 13:42:29 dkf Exp $ + * RCS: @(#) $Id: tkWinEmbed.c,v 1.31 2006/05/29 22:21:40 hobbs Exp $ */ #include "tkWinInt.h" @@ -931,7 +931,6 @@ TkpGetOtherWindow( return containerPtr->embeddedPtr; } } - Tcl_Panic("TkpGetOtherWindow couldn't find window"); return NULL; } |