summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-04-11 20:23:44 (GMT)
committerhobbs <hobbs>2006-04-11 20:23:44 (GMT)
commitd0a666e9c9e337b597f57095c22c8fb39b918425 (patch)
treea0e8b9c2dee308ca79631372ca6f3a2fbdf3954f
parent39394c1167057439fa67fd1e23f5ffcc569d84a9 (diff)
downloadtk-d0a666e9c9e337b597f57095c22c8fb39b918425.zip
tk-d0a666e9c9e337b597f57095c22c8fb39b918425.tar.gz
tk-d0a666e9c9e337b597f57095c22c8fb39b918425.tar.bz2
* win/tkWinEmbed.c (TkpGetOtherWindow): do not panic if no window
* win/tkWinWm.c (UpdateGeometryInfo): is found - handle it in * unix/tkUnixEmbed.c (TkpGetOtherWindow): the caller. [Bug 1212056] * unix/tkUnixWm.c (Tk_CoordsToWindow, UpdateGeometryInfo):
-rw-r--r--unix/tkUnixEmbed.c3
-rw-r--r--unix/tkUnixWm.c14
-rw-r--r--win/tkWinEmbed.c3
-rw-r--r--win/tkWinWm.c9
4 files changed, 18 insertions, 11 deletions
diff --git a/unix/tkUnixEmbed.c b/unix/tkUnixEmbed.c
index 6cf9159..04eb4ba 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.6 2002/08/05 04:30:41 dgp Exp $
+ * RCS: @(#) $Id: tkUnixEmbed.c,v 1.6.2.1 2006/04/11 20:23:44 hobbs Exp $
*/
#include "tkInt.h"
@@ -729,7 +729,6 @@ TkpGetOtherWindow(winPtr)
return containerPtr->embeddedPtr;
}
}
- panic("TkpGetOtherWindow couldn't find window");
return NULL;
}
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index ab4c664..3c92139 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.36.2.6 2005/06/01 00:07:29 mdejong Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.36.2.7 2006/04/11 20:23:45 hobbs Exp $
*/
#include "tkPort.h"
@@ -4254,6 +4254,7 @@ UpdateGeometryInfo(clientData)
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
@@ -4264,11 +4265,13 @@ UpdateGeometryInfo(clientData)
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) {
+ height += wmPtr->menuHeight;
+ Tk_GeometryRequest((Tk_Window) childPtr, width, height);
+ }
return;
}
+
serial = NextRequest(winPtr->display);
height += wmPtr->menuHeight;
if (wmPtr->flags & WM_MOVE_PENDING) {
@@ -5261,6 +5264,9 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
*/
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 a916050..977d52c 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.7.2.1 2004/10/27 00:37:38 davygrvy Exp $
+ * RCS: @(#) $Id: tkWinEmbed.c,v 1.7.2.2 2006/04/11 20:23:45 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -542,7 +542,6 @@ TkpGetOtherWindow(winPtr)
return containerPtr->embeddedPtr;
}
}
- panic("TkpGetOtherWindow couldn't find window");
return NULL;
}
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index f10010b..de4056a 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.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: tkWinWm.c,v 1.54.2.24 2006/04/05 19:47:49 hobbs Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.54.2.25 2006/04/11 20:23:45 hobbs Exp $
*/
#include "tkWinInt.h"
@@ -5582,10 +5582,13 @@ UpdateGeometryInfo(clientData)
*/
if (winPtr->flags & TK_BOTH_HALVES) {
+ TkWindow *childPtr = TkpGetOtherWindow(winPtr);
+
wmPtr->x = wmPtr->y = 0;
wmPtr->flags &= ~(WM_NEGATIVE_X|WM_NEGATIVE_Y);
- Tk_GeometryRequest((Tk_Window) TkpGetOtherWindow(winPtr),
- width, height);
+ if (childPtr != NULL) {
+ Tk_GeometryRequest((Tk_Window) childPtr, width, height);
+ }
return;
}