From b9ccac7e17ee95ab1154deadf3da64a26ad9e150 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 9 Mar 2021 09:04:53 -0500 Subject: [PATCH] Modified the UGetCursor() routine to return a valid response if the TkWindowId is NULL do to lack of a mapped X11 window. --- VERSION | 2 +- functions.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index deb65d3..b6ff2cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.10.33 +3.10.34 diff --git a/functions.c b/functions.c index 6aa7a56..3603466 100644 --- a/functions.c +++ b/functions.c @@ -772,6 +772,12 @@ XPoint UGetCursor() /* Don't use areawin->window; if called from inside an object */ /* (e.g., "here" in a Tcl expression), areawin->window will be */ /* an off-screen pixmap, and cause a crash. */ + + if (Tk_WindowId(areawin->area) == (Window)NULL) { + newpos.x = newpos.y = 0; + return newpos; + } + #ifndef _MSC_VER XQueryPointer(dpy, Tk_WindowId(areawin->area), &nullwin, &nullwin, &nullint, &nullint, &xpos, &ypos, &nullui); -- 2.11.4.GIT