[BUG] Missed events in 3.1 (Unix, Win32)

Ned Konz ned at bike-nomad.com
Sat Mar 10 22:13:55 UTC 2001


On Saturday 10 March 2001 13:13, John M McIntosh wrote:

> The problem is is that many routines lead to the prim functions in
> EventSensor where any pending events get flushed which was changed by
> ar on 12/5/00. Someone needs to review ALL the prim call trees and
> understand what why the flush got there in the first place, and why
> it causes problems. Some paths lead to overrides in EventSensor that
> don't do the flush.

Yes, that seems to be the problem.

I fixed it (apparently, for me...) by just removing the offending flushes 
(since the events will eventually get handled anyway).

I've attached the changes, but I have no idea whether this is the Right Thing 
To Do (not knowing why it was there in the first place).

-- 
Ned Konz
currently: Stanwood, WA
email:     ned at bike-nomad.com
homepage:  http://bike-nomad.com
-------------- next part --------------
'From Squeak3.1alpha of 7 March 2001 [latest update: #3812] on 10 March 2001 at 2:10:30 pm'!
"Change Set:		EventSensorTweaks-nk
Date:			10 March 2001
Author:			Ned Konz

Changing these gets rid of missed events.
Don't know why all that flushing was going on."!


!EventSensor methodsFor: 'private' stamp: 'nk 3/10/2001 14:06'!
primKbdNext
	inputSemaphore signal.
	"eventQueue ifNotNil:[eventQueue flush]."
	keyboardBuffer isEmpty
		ifTrue:[^nil]
		ifFalse:[^keyboardBuffer next]! !

!EventSensor methodsFor: 'private' stamp: 'nk 3/10/2001 14:06'!
primKbdPeek
	inputSemaphore signal.
	"eventQueue ifNotNil:[eventQueue flush]."
	^keyboardBuffer peek! !

!EventSensor methodsFor: 'private' stamp: 'nk 3/10/2001 14:06'!
primMouseButtons
	inputSemaphore signal.
	"eventQueue ifNotNil:[eventQueue flush]."
	^mouseButtons! !

!EventSensor methodsFor: 'private' stamp: 'nk 3/10/2001 14:06'!
primMousePt
	inputSemaphore signal.
	"eventQueue ifNotNil:[eventQueue flush]."
	^mousePosition! !



More information about the Squeak-dev mailing list