summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-05-29 22:21:39 (GMT)
committerhobbs <hobbs>2006-05-29 22:21:39 (GMT)
commitde94051cc9cefddb0cfae707598416939eabe5b8 (patch)
treeffc2567e249c5475bbb460da90068f7b83331815 /unix
parenta7c8588873469c05f9182cd88d68fce9eec6ebe5 (diff)
downloadtk-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
Diffstat (limited to 'unix')
-rw-r--r--unix/tkUnixEmbed.c3
-rw-r--r--unix/tkUnixWm.c12
2 files changed, 10 insertions, 5 deletions
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;