diff options
author | mdejong <mdejong@noemail.net> | 2003-02-18 06:22:44 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2003-02-18 06:22:44 (GMT) |
commit | 2250e6cd7913daf076ee1a5fb9ea45e2f2180f40 (patch) | |
tree | 4c81cd56ef843501912d782732a5165b523d2f02 /tests | |
parent | a474c3282d3fe3442c160821fd21e19fcde02dd3 (diff) | |
download | tk-2250e6cd7913daf076ee1a5fb9ea45e2f2180f40.zip tk-2250e6cd7913daf076ee1a5fb9ea45e2f2180f40.tar.gz tk-2250e6cd7913daf076ee1a5fb9ea45e2f2180f40.tar.bz2 |
* generic/tkEvent.c (Tk_HandleEvent): Fixup button
press state saving code, it was incorrectly converting
normal motion events into button press and motion
events in some cases.
* generic/tkInt.h: Add mouseButtonWindow member
to the TkDisplay structure.
* tests/event.test: Add test case for faulty
button motion logic.
FossilOrigin-Name: e79d36e4257422c5659d9a61879718160950fb62
Diffstat (limited to 'tests')
-rw-r--r-- | tests/event.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/event.test b/tests/event.test index e989f02..66fc029 100644 --- a/tests/event.test +++ b/tests/event.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: event.test,v 1.12 2002/12/02 03:42:28 mdejong Exp $ +# RCS: @(#) $Id: event.test,v 1.13 2003/02/18 06:22:44 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -649,6 +649,21 @@ test event-triple-click-drag-1.1 { Triple click and drag across lines in } [list "LINE THREE\n" "LINE TWO\nLINE THREE\n" \ "LINE ONE\nLINE TWO\nLINE THREE\n"] +test event-button-state-1.1 { button press in a window that is then + destroyed, when the mouse is moved into another window it + should not generate a <B1-motion> event since the mouse + was not pressed down in that window. } { + destroy .t + set t [toplevel .t] + + event generate $t <ButtonPress-1> + destroy $t + set t [toplevel .t] + set motion nomotion + bind $t <B1-Motion> {set motion inmotion} + event generate $t <Motion> + set motion +} nomotion # cleanup |