summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tkUnixWm.c')
-rw-r--r--unix/tkUnixWm.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index c87fe53..b4ea55d 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.4 1999/04/16 01:51:47 stanton Exp $
+ * RCS: @(#) $Id: tkUnixWm.c,v 1.5 1999/12/21 23:56:34 hobbs Exp $
*/
#include "tkPort.h"
@@ -3490,6 +3490,7 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
WmInfo *wmPtr;
TkWindow *winPtr, *childPtr, *nextPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
+ Tk_ErrorHandler handler;
/*
* Step 1: scan the list of toplevel windows to see if there is a
@@ -3528,12 +3529,17 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
* the toplevel.
*/
+ handler = Tk_CreateErrorHandler(Tk_Display(tkwin), -1, -1, -1,
+ (Tk_ErrorProc *) NULL, (ClientData) NULL);
while (1) {
if (XTranslateCoordinates(Tk_Display(tkwin), parent, window,
x, y, &childX, &childY, &child) == False) {
- panic("Tk_CoordsToWindow got False return from XTranslateCoordinates");
+ fprintf (stderr, "Tk_CoordsToWindow got False return from XTranslateCoordinates\n");
+ fflush (stderr);
+ return NULL;
}
if (child == None) {
+ Tk_DeleteErrorHandler(handler);
return NULL;
}
for (wmPtr = (WmInfo *) dispPtr->firstWmPtr; wmPtr != NULL;
@@ -3556,6 +3562,7 @@ Tk_CoordsToWindow(rootX, rootY, tkwin)
}
gotToplevel:
+ Tk_DeleteErrorHandler(handler);
winPtr = wmPtr->winPtr;
if (winPtr->mainPtr != ((TkWindow *) tkwin)->mainPtr) {
return NULL;