care for slow scrollers (lots of exposes) when autorepeating
(peek at the event queue).
--- a/ButtonC.st Fri Sep 03 12:14:19 1999 +0200
+++ b/ButtonC.st Sat Sep 04 12:52:08 1999 +0200
@@ -444,6 +444,7 @@
].
self performAction.
+ view flush.
autoRepeat ifTrue:[
Processor addTimedBlock:repeatBlock afterSeconds:initialDelay
@@ -655,15 +656,21 @@
(pressed and:[entered]) ifTrue:[
enableChannel value ifTrue:[
active ifFalse:[
- self performAction.
+ "/ dont repeat, if a release is pending ...
+ "/ (must check this, because the release event could
+ "/ stick in the queue, since exposes are handled first,
+ "/ which could lead to event processing to never happen)
+ (view sensor hasButtonReleaseEventFor:view) ifFalse:[
+ self performAction.
- autoRepeat ifTrue:[
- view graphicsDevice shiftDown ifTrue:[
- dly := repeatDelay / 4.
- ] ifFalse:[
- dly := repeatDelay
- ].
- Processor addTimedBlock:repeatBlock afterSeconds:dly
+ autoRepeat ifTrue:[
+ view graphicsDevice shiftDown ifTrue:[
+ dly := repeatDelay / 4.
+ ] ifFalse:[
+ dly := repeatDelay
+ ].
+ Processor addTimedBlock:repeatBlock afterSeconds:dly
+ ]
]
]
]
@@ -726,5 +733,5 @@
!ButtonController class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.58 1999-04-01 13:21:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Attic/ButtonC.st,v 1.59 1999-09-04 10:52:08 cg Exp $'
! !
--- a/ButtonController.st Fri Sep 03 12:14:19 1999 +0200
+++ b/ButtonController.st Sat Sep 04 12:52:08 1999 +0200
@@ -444,6 +444,7 @@
].
self performAction.
+ view flush.
autoRepeat ifTrue:[
Processor addTimedBlock:repeatBlock afterSeconds:initialDelay
@@ -655,15 +656,21 @@
(pressed and:[entered]) ifTrue:[
enableChannel value ifTrue:[
active ifFalse:[
- self performAction.
+ "/ dont repeat, if a release is pending ...
+ "/ (must check this, because the release event could
+ "/ stick in the queue, since exposes are handled first,
+ "/ which could lead to event processing to never happen)
+ (view sensor hasButtonReleaseEventFor:view) ifFalse:[
+ self performAction.
- autoRepeat ifTrue:[
- view graphicsDevice shiftDown ifTrue:[
- dly := repeatDelay / 4.
- ] ifFalse:[
- dly := repeatDelay
- ].
- Processor addTimedBlock:repeatBlock afterSeconds:dly
+ autoRepeat ifTrue:[
+ view graphicsDevice shiftDown ifTrue:[
+ dly := repeatDelay / 4.
+ ] ifFalse:[
+ dly := repeatDelay
+ ].
+ Processor addTimedBlock:repeatBlock afterSeconds:dly
+ ]
]
]
]
@@ -726,5 +733,5 @@
!ButtonController class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.58 1999-04-01 13:21:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ButtonController.st,v 1.59 1999-09-04 10:52:08 cg Exp $'
! !