summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--unix/tkUnixEmbed.c3
-rw-r--r--unix/tkUnixWm.c12
-rw-r--r--win/tkWinEmbed.c3
4 files changed, 16 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index ac7edea..d003455 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}