--- a/DragAndDropManager.st Thu Oct 31 18:51:09 2002 +0100
+++ b/DragAndDropManager.st Mon Nov 04 15:29:55 2002 +0100
@@ -15,7 +15,8 @@
Object subclass:#DragAndDropManager
instanceVariableNames:'dropContext dragView dropAction dragOffset handler restoreBlock
- alienCursor enabledCursor disabledCursor canDrop escapePressed'
+ alienCursor enabledCursor disabledCursor canDrop escapePressed
+ passiveAction'
classVariableNames:'DragContextQuerySignal DragOriginatorQuerySignal
DragOffsetQuerySignal ActiveDragAndDropManagers'
poolDictionaries:''
@@ -737,6 +738,20 @@
!
+passiveAction:aBlockOrNil
+ self removePassiveAction.
+ aBlockOrNil notNil ifTrue:[
+ passiveAction := Processor addTimedBlock:aBlockOrNil afterMilliseconds:100
+ ].
+!
+
+removePassiveAction
+ passiveAction notNil ifTrue:[
+ Processor removeTimeoutWithID:passiveAction.
+ passiveAction := nil.
+ ].
+!
+
sourceWidget
^ dragView
! !
@@ -1093,6 +1108,8 @@
"
|oldPt oldTgt oldWg oldId newWg newId newTgt screenPoint cursor device isDroppable|
+ self removePassiveAction.
+
escapePressed == true ifTrue:[^ self].
device := dragView device.
@@ -1192,9 +1209,12 @@
buttonRelease:button x:x y:y view:aView
"button released; do the drop
"
+
((button == 2) or:[button == #menu]) ifTrue:[
^ self
].
+
+ self removePassiveAction.
"/
"/ update the context
"/
@@ -1462,7 +1482,7 @@
!DragAndDropManager class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.43 2002-10-22 08:53:02 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.44 2002-11-04 14:29:55 cg Exp $'
! !
DragAndDropManager initialize!