diff options
author | fvogelnew1@free.fr <fvogel> | 2016-05-30 20:20:28 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2016-05-30 20:20:28 (GMT) |
commit | 5dfb9b351c0f9e613555a9ae5bee91ec0918915e (patch) | |
tree | 8cbe447b5ccfad9d8a09717de6f63c61e96ed7f1 | |
parent | 27dc84883dcb0433fcbecdd32205d7f7d93826fb (diff) | |
parent | a7b09ff9ff67c6acf816b7280f7bb6308e9bb9f0 (diff) | |
download | tk-5dfb9b351c0f9e613555a9ae5bee91ec0918915e.zip tk-5dfb9b351c0f9e613555a9ae5bee91ec0918915e.tar.gz tk-5dfb9b351c0f9e613555a9ae5bee91ec0918915e.tar.bz2 |
Fixed tests cases bad interactions and a forgotten mouse warping case (event generate {} <...> -warp 1 is valid)
-rw-r--r-- | generic/tkBind.c | 7 | ||||
-rw-r--r-- | tests/bind.test | 1 |
2 files changed, 6 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); } diff --git a/tests/bind.test b/tests/bind.test index ff1b4f9..892ba36 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -6108,6 +6108,7 @@ test bind-32 {-warp, window was destroyed before the idle callback DoWarp} -setu update } -body { event generate .t.f <Button-1> -warp 1 + event generate .t.f <ButtonRelease-1> destroy .t.f update ; # shall simply not crash } -cleanup { |