summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-05-30 19:38:04 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-05-30 19:38:04 (GMT)
commit92e74a8c67eed135bf2c8a43325ff589c48ae11d (patch)
tree0c0662ab12f835615d67d1328bfdad1304716450
parent56a2c1da5ec5cb788ffcb942c402a94efd2c74b2 (diff)
downloadtk-92e74a8c67eed135bf2c8a43325ff589c48ae11d.zip
tk-92e74a8c67eed135bf2c8a43325ff589c48ae11d.tar.gz
tk-92e74a8c67eed135bf2c8a43325ff589c48ae11d.tar.bz2
Fixed crash when calling event generate {} <Motion> -warp 1
-rw-r--r--generic/tkBind.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 4374494..3b05066 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -3539,10 +3539,13 @@ DoWarp(
* DoWarp was scheduled only if the window was mapped. It needs to be
* still mapped at the time the present idle callback is executed. Also
* one needs to guard against window destruction in the meantime.
+ * Finally, the case warpWindow == NULL is special in that it means
+ * the whole screen.
*/
- if (Tk_IsMapped(dispPtr->warpWindow)
- && (Tk_WindowId(dispPtr->warpWindow) != None)) {
+ if ((dispPtr->warpWindow == NULL) ||
+ (Tk_IsMapped(dispPtr->warpWindow)
+ && (Tk_WindowId(dispPtr->warpWindow) != None))) {
TkpWarpPointer(dispPtr);
XForceScreenSaver(dispPtr->display, ScreenSaverReset);
}