--- a/DSurface.st Sun Jan 10 17:24:35 1999 +0100
+++ b/DSurface.st Sun Jan 10 18:03:56 1999 +0100
@@ -1655,51 +1655,56 @@
waitForExpose
"wait until an expose event arrives (to wait for scroll-finish)"
- |wg endPollTime|
+ |wg endPollTime pollDelay|
device scrollsAsynchronous ifFalse:[
- gotExpose := true.
- ^ self
+ gotExpose := true.
+ ^ self
].
wg := self windowGroup.
wg notNil ifTrue:[
- "/
- "/ a normal (suspendable) view.
- "/ wait by doing a real wait
- "/
- wg waitForExposeFor:self
+ "/
+ "/ a normal (suspendable) view.
+ "/ wait by doing a real wait
+ "/
+ wg waitForExposeFor:self
] ifFalse:[
- "/
- "/ a pure event driven view.
- "/ wait by doing a direct dispatch loop until the event arrives.
- "/ i.e. poll for the event
- "/
- endPollTime := AbsoluteTime now addSeconds:10.
+ "/
+ "/ a pure event driven view.
+ "/ wait by doing a direct dispatch loop until the event arrives.
+ "/ i.e. poll for the event
+ "/
+ device platformName = 'WIN32' ifTrue:[
+ pollDelay := 1.
+ ] ifFalse:[
+ pollDelay := 3.
+ ].
+ endPollTime := AbsoluteTime now addSeconds:pollDelay.
- [gotExpose] whileFalse:[
- realized ifTrue:[
- (device exposeEventPendingFor:drawableId withSync:true) ifTrue:[
- device dispatchExposeEventFor:drawableId.
- ].
- ].
- realized ifFalse:[
- gotExpose := true.
- ^ self
- ].
+ [gotExpose] whileFalse:[
+ realized ifTrue:[
+ (device exposeEventPendingFor:drawableId withSync:true) ifTrue:[
+ device dispatchExposeEventFor:drawableId.
+ ].
+ ].
+ realized ifFalse:[
+ gotExpose := true.
+ ^ self
+ ].
- "/ break out of the poll after a while
+ "/ break out of the poll after a while
- AbsoluteTime now > endPollTime ifTrue:[
- 'DisplaySurface [warning]: lost expose event' errorPrintCR.
- gotExpose := true.
- ^ self
- ].
- Processor yield.
- ].
+ AbsoluteTime now > endPollTime ifTrue:[
+ 'DisplaySurface [warning]: lost expose event' errorPrintCR.
+ gotExpose := true.
+ ^ self
+ ].
+ Processor yield.
+ ].
]
- "Modified: 19.8.1997 / 17:22:46 / cg"
+ "Modified: / 9.1.1999 / 01:58:09 / cg"
! !
!DisplaySurface methodsFor:'initialize / release'!
@@ -2103,5 +2108,5 @@
!DisplaySurface class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/DSurface.st,v 1.49 1998-11-11 15:17:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/DSurface.st,v 1.50 1999-01-10 17:03:24 cg Exp $'
! !