diff -r 618503d1c7f6 -r 358644786358 WindowSensor.st --- a/WindowSensor.st Fri Feb 05 00:14:52 1999 +0100 +++ b/WindowSensor.st Fri Feb 05 21:25:47 1999 +0100 @@ -734,7 +734,7 @@ buttonMotion:state x:x y:y view:aView "mouse was moved - this is sent from the device (Display)" - |args ev| + |args ev ignoreIt| "/ update my idea of shift/alt/ctrl pressed information self updateModifierStateFrom:state device:(aView graphicsDevice). @@ -756,16 +756,25 @@ merge with last motion " self criticalUserEventQueueAccess:[ - mouseAndKeyboard reverseDo:[:ev | + |idx| + + idx := mouseAndKeyboard size. + [idx > 0] whileTrue:[ + ev := mouseAndKeyboard at:idx. ev notNil ifTrue:[ ((ev type == #buttonMotion:x:y:) and:[(ev view == aView) and:[(ev arguments at:1) == state]]) ifTrue:[ ev arguments:args. - ^ self + idx := 0. + ignoreIt := true ] - ] - ] + ]. + idx := idx - 1. + ]. + ]. + ignoreIt == true ifTrue:[ + ^ self ] ]. @@ -777,7 +786,7 @@ button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown. self pushEvent:ev. - "Modified: / 6.6.1998 / 21:09:14 / cg" + "Modified: / 5.2.1999 / 21:23:31 / cg" ! buttonMultiPress:button x:x y:y view:aView @@ -1805,13 +1814,11 @@ ]. idx := idx + 1. ]. - damageSize > 10 ifTrue:[ - firstNonNilIndex isNil ifTrue:[ - damage removeAll - ] ifFalse:[ - firstNonNilIndex ~~ 1 ifTrue:[ - damage removeFromIndex:1 toIndex:firstNonNilIndex - ] + firstNonNilIndex isNil ifTrue:[ + damage removeAll + ] ifFalse:[ + firstNonNilIndex ~~ 1 ifTrue:[ + damage removeFromIndex:1 toIndex:firstNonNilIndex ] ] ]. @@ -1819,7 +1826,7 @@ ^ theEvent "Created: / 3.12.1998 / 13:41:49 / cg" - "Modified: / 3.2.1999 / 01:39:26 / cg" + "Modified: / 5.2.1999 / 20:58:20 / cg" ! nextEvent @@ -1886,13 +1893,11 @@ idx := idx + 1. ]. - damageSize > 10 ifTrue:[ - firstNonNilIndex isNil ifTrue:[ - damage removeAll - ] ifFalse:[ - firstNonNilIndex ~~ 1 ifTrue:[ - damage removeFromIndex:1 toIndex:firstNonNilIndex-1 - ] + firstNonNilIndex isNil ifTrue:[ + damage removeAll + ] ifFalse:[ + firstNonNilIndex ~~ 1 ifTrue:[ + damage removeFromIndex:1 toIndex:firstNonNilIndex-1 ] ]. ]. @@ -1900,7 +1905,7 @@ ^ theEvent "Created: / 21.5.1996 / 17:20:54 / cg" - "Modified: / 3.2.1999 / 01:41:31 / cg" + "Modified: / 5.2.1999 / 20:58:28 / cg" ! pendingEvent @@ -2710,6 +2715,6 @@ !WindowSensor class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.140 1999-02-04 23:13:09 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.141 1999-02-05 20:25:47 cg Exp $' ! ! WindowSensor initialize!