Use #viewIdFromPoint: to get the drop target.
authorStefan Vogel <sv@exept.de>
Tue, 03 Apr 2001 18:25:32 +0200
changeset 1466 f6a566b26c9e
parent 1465 02c6dfc01257
child 1467 035afe3aa0ed
Use #viewIdFromPoint: to get the drop target. Fix for KDE 2.1 windowmanager (virtual root view)
DragAndDropManager.st
--- a/DragAndDropManager.st	Mon Apr 02 14:58:07 2001 +0200
+++ b/DragAndDropManager.st	Tue Apr 03 18:25:32 2001 +0200
@@ -1008,10 +1008,9 @@
 buttonMotion:button x:x y:y view:aView
     "handle a button motion event
     "
-    |oldPt oldTgt oldWg oldId newWg newId newTgt point rootId cursor device isDroppable|
+    |oldPt oldTgt oldWg oldId newWg newId newTgt point cursor device isDroppable|
 
     device := dragView device.
-    rootId := device rootView id.
     point  := self translatePointToScreen:(x @ y) from:dragView.
     oldWg  := dropContext targetWidget.
     oldId  := dropContext targetId.
@@ -1019,13 +1018,7 @@
 
     dropContext rootPoint:point.
 
-    "/
-    "/ search view the drop is in
-    "/
-    [   newId := rootId.
-        (rootId := device viewIdFromPoint:point in:newId) notNil
-    ] whileTrue.
-
+    newId := device viewIdFromPoint:point.
     newWg := device viewFromId:newId.
     dropContext targetWidget:newWg id:newId.
 
@@ -1318,6 +1311,6 @@
 !DragAndDropManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.27 2000-11-17 00:43:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/DragAndDropManager.st,v 1.28 2001-04-03 16:25:32 stefan Exp $'
 ! !
 DragAndDropManager initialize!