diff options
author | fvogel <fvogel@noemail.net> | 2016-05-30 20:28:46 (GMT) |
---|---|---|
committer | fvogel <fvogel@noemail.net> | 2016-05-30 20:28:46 (GMT) |
commit | 16962f7e1a1fa00d49a77d2f26bda834bd42e49a (patch) | |
tree | 61eeb47d6a39314452eed642f297dd8fdd10fa58 | |
parent | 938999556890c0e4870fc3d43671486c960d0bd7 (diff) | |
parent | 3c123513d743d8349794fa2ba9b8a283a69b4601 (diff) | |
download | tk-16962f7e1a1fa00d49a77d2f26bda834bd42e49a.zip tk-16962f7e1a1fa00d49a77d2f26bda834bd42e49a.tar.gz tk-16962f7e1a1fa00d49a77d2f26bda834bd42e49a.tar.bz2 |
Fixed tests cases bad interactions and a forgotten mouse warping case (event generate {} <...> -warp 1 is valid)
FossilOrigin-Name: 32b7a0621bdc134b85d7332e02d31563c2515714
-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 8ee5994..acc4e43 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 9f0caa7..374ef9b 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -6164,6 +6164,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 { |