summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-04-11 20:23:44 (GMT)
committerhobbs <hobbs>2006-04-11 20:23:44 (GMT)
commitb2ac426e6b4f65bf6baa0e9c9f48eb997dfc5a75 (patch)
treea0e8b9c2dee308ca79631372ca6f3a2fbdf3954f /unix/tkUnixWm.c
parent19f82e071a4b4a263c78f6a0809bfc347b33641a (diff)
downloadtk-b2ac426e6b4f65bf6baa0e9c9f48eb997dfc5a75.zip
tk-b2ac426e6b4f65bf6baa0e9c9f48eb997dfc5a75.tar.gz
tk-b2ac426e6b4f65bf6baa0e9c9f48eb997dfc5a75.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):
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c14
1 files changed, 10 insertions, 4 deletions
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;