diff options
author | fvogel <fvogel@noemail.net> | 2016-05-30 18:33:40 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2016-05-30 18:33:40 (GMT) |
commit | eb9d9fd4106a0e6d16f0e5a5d13109ac8779a458 (patch) | |
tree | 0feec6a06cde63ca3b4b0bd6129f1824451219db /generic | |
parent | 54955b31a35aa13561c903327f6f93dec3e5df21 (diff) | |
parent | 95654e633757a55fe566e344eeeca85dcd36e9dd (diff) | |
download | tk-eb9d9fd4106a0e6d16f0e5a5d13109ac8779a458.zip tk-eb9d9fd4106a0e6d16f0e5a5d13109ac8779a458.tar.gz tk-eb9d9fd4106a0e6d16f0e5a5d13109ac8779a458.tar.bz2 |
Fixed [79549a9134] - Mouse pointer warping crashes
FossilOrigin-Name: af79c31a4e6df3a531e5f43d2c7802e3974f2251
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkBind.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 9cd3b7b..4374494 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -3535,8 +3535,17 @@ DoWarp( { TkDisplay *dispPtr = clientData; - TkpWarpPointer(dispPtr); - XForceScreenSaver(dispPtr->display, ScreenSaverReset); + /* + * 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. + */ + + if (Tk_IsMapped(dispPtr->warpWindow) + && (Tk_WindowId(dispPtr->warpWindow) != None)) { + TkpWarpPointer(dispPtr); + XForceScreenSaver(dispPtr->display, ScreenSaverReset); + } dispPtr->flags &= ~TK_DISPLAY_IN_WARP; } |