[Morphic][BUG?][Drag&Drop] mouseLeaveDragging events occure too many and these at wrong times

Stephan Rudlof sr at evolgo.de
Sun Mar 26 23:13:39 UTC 2000


Here is my suggestion for mouseUp events: HandMorph>>

handleMouseUp: evt 
	"Stephan's variant..."
	"Dispatch a mouseUp event."
	| oldFocus |
	clickState ~~ #idle ifTrue: [self checkForDoubleClick: evt].
	"drop morphs being carried, if any"
	self hasSubmorphs ifTrue: [self dropMorphsEvent: evt].
	">>>>>mouseDownMorph = nil ifTrue: [^ self].<<<<<"
	oldFocus _ mouseDownMorph.
	"make sure that focus becomes nil."
	mouseDownMorph _ nil.
	"mouse focus transaction ends when mouse goes up"
	oldFocus ifNotNil: [oldFocus mouseUp: (self transformEvent: evt)].
	dragOverMorphs copy do: 
		[:m | 
		dragOverMorphs remove: m.
		oldFocus notNil ifTrue: [m mouseLeaveDragging: (evt transformedBy: (m
transformFrom: self))]]


It eats up superfluous mouseUp events. Now just the mouseDown variant is
missing...

Greetings,

Stephan





More information about the Squeak-dev mailing list