#UI_ENHANCEMENT by cg
class: DragAndDropManager
class definition
changed: #buttonMotion:x:y:view:
raise window under the pointer after a short delay
--- a/DragAndDropManager.st Wed Jun 13 20:44:25 2018 +0200
+++ b/DragAndDropManager.st Wed Jun 13 21:34:45 2018 +0200
@@ -17,7 +17,8 @@
instanceVariableNames:'dropContext dragView dropAction dragOffset handler restoreBlock
alienCursor enabledCursor disabledCursor canDrop escapePressed
passiveAction autoScrollTask disabledFlag giveFocusToTargetWidget
- notifyEndOfDropAction savedCursor lastTopView'
+ notifyEndOfDropAction savedCursor lastTopView
+ timeLastTopViewWasEntered raiseViewTimedAction'
classVariableNames:'DragContextQuerySignal DragOriginatorQuerySignal
DragOffsetQuerySignal ActiveDragAndDropManagers'
poolDictionaries:''
@@ -1253,7 +1254,14 @@
newWidget notNil ifTrue:[
newTopView := newWidget topView.
newTopView ~~ lastTopView ifTrue:[
- newTopView raise.
+ raiseViewTimedAction notNil ifTrue:[
+ Processor removeTimedBlock:raiseViewTimedAction.
+ ].
+ newTopView isRootView ifFalse:[
+ raiseViewTimedAction := [ lastTopView raise ].
+ Processor addTimedBlock:raiseViewTimedAction after:0.75 seconds.
+ "/ newTopView raise.
+ ].
lastTopView := newTopView
].
].
@@ -1324,7 +1332,7 @@
newTarget notNil ifTrue:[ newTarget over:dropContext ].
handler dragTo:screenPoint.
- "Modified: / 05-06-2018 / 10:16:44 / Claus Gittinger"
+ "Modified: / 13-06-2018 / 21:33:48 / Claus Gittinger"
!
buttonRelease:button x:x y:y view:aView