summaryrefslogtreecommitdiffstats
path: root/tests/bind.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-15 12:45:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-15 12:45:49 (GMT)
commit8d9917ac755006729ee15fdd22e399f5861385c2 (patch)
treee8969c03014977ebf987de5ccfd62ebe2efada6d /tests/bind.test
parent15400a3c74cabbb69e7548b6dfa5812595eed24c (diff)
parent21c80c279f1a6edee55718c40818e5a3f59e1dfb (diff)
downloadtk-8d9917ac755006729ee15fdd22e399f5861385c2.zip
tk-8d9917ac755006729ee15fdd22e399f5861385c2.tar.gz
tk-8d9917ac755006729ee15fdd22e399f5861385c2.tar.bz2
Merge 8.6
Diffstat (limited to 'tests/bind.test')
-rw-r--r--tests/bind.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/bind.test b/tests/bind.test
index 08694f4..b0cb68a 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -6749,6 +6749,25 @@ test bind-34.2 {-warp works relatively to the screen} -setup {
lappend res {*}[winfo pointerxy .]
} -cleanup {
} -result {20 20 200 200}
+test bind-34.3 {-warp works with null or negative coordinates} -setup {
+} -body {
+ event generate {} <Motion> -x 0 -y 0 -warp 1
+ update idletasks ; # DoWarp is an idle callback
+ after 50 ; # Win specific - wait for SendInput to be executed
+ set res [winfo pointerxy .]
+ event generate {} <Motion> -x -1 -y -1 -warp 1
+ update idletasks ; # DoWarp is an idle callback
+ after 50 ; # Win specific - wait for SendInput to be executed
+ foreach dim [winfo pointerxy .] {
+ if {$dim <= 0} {
+ lappend res ok
+ } else {
+ lappend res $dim
+ }
+ }
+ set res
+} -cleanup {
+} -result {0 0 ok ok}
# cleanup
cleanupTests