add #giveFocusToTargetWidget
authorca
Mon, 03 Dec 2007 10:56:28 +0100
changeset 2358 7eca18445279
parent 2357 918859a27b27
child 2359 283d81512850
add #giveFocusToTargetWidget
DragAndDropManager.st
--- a/DragAndDropManager.st	Fri Nov 23 14:06:49 2007 +0100
+++ b/DragAndDropManager.st	Mon Dec 03 10:56:28 2007 +0100
@@ -14,7 +14,7 @@
 Object subclass:#DragAndDropManager
 	instanceVariableNames:'dropContext dragView dropAction dragOffset handler restoreBlock
 		alienCursor enabledCursor disabledCursor canDrop escapePressed
-		passiveAction autoScrollTask disabledFlag'
+		passiveAction autoScrollTask disabledFlag giveFocusToTargetWidget'
 	classVariableNames:'DragContextQuerySignal DragOriginatorQuerySignal
 		DragOffsetQuerySignal ActiveDragAndDropManagers'
 	poolDictionaries:''
@@ -871,6 +871,10 @@
     ^ dragView font
 !
 
+giveFocusToTargetWidget:aBoolean
+    giveFocusToTargetWidget := aBoolean.
+!
+
 isDisabled
     ^ disabledFlag ? false
 !
@@ -1272,9 +1276,11 @@
 "/            dropContext targetWidget requestFocus    
 "/        ].
 "/    ].
-    (targetWidget notNil and:[targetWidget shown]) ifTrue:[
-        targetWidget topView raise; activate.
-        targetWidget takeFocus.    
+    giveFocusToTargetWidget ifTrue:[
+        (targetWidget notNil and:[targetWidget shown]) ifTrue:[
+            targetWidget topView raise; activate.
+            targetWidget takeFocus.    
+        ].
     ].
 !
 
@@ -1376,6 +1382,7 @@
     enabledCursor  := Cursor thumbsUp.
     disabledCursor := Cursor thumbsDown.
     canDrop        := false.
+    giveFocusToTargetWidget := true.
 ! !
 
 !DragAndDropManager methodsFor:'private'!
@@ -1573,7 +1580,7 @@
 !DragAndDropManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.73 2006-10-13 16:24:00 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.74 2007-12-03 09:56:28 ca Exp $'
 ! !
 
 DragAndDropManager initialize!