#FEATURE by Stefan Reise
authorsr
Fri, 15 Nov 2019 11:32:27 +0100
changeset 4394 136d5851f5ba
parent 4393 001140ff0138
child 4395 fb4106b2ff7a
#FEATURE by Stefan Reise support scaled/virtual displays class: DragHandler::Opaque changed: #dragTo:
DragHandler.st
--- a/DragHandler.st	Fri Nov 08 10:18:20 2019 +0100
+++ b/DragHandler.st	Fri Nov 15 11:32:27 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1998 by eXept Software AG / Claus Gittinger
               All Rights Reserved
@@ -335,21 +337,25 @@
 dragTo:aRootPoint
     "drag to a root point"
 
-    |p point area|
+    |p point area rootDisplayPoint|
+
+    aRootPoint notNil ifTrue:[
+        rootDisplayPoint := Screen transformVirtualDisplayPointToRootDisplayPoint:aRootPoint.
+    ].
 
     (saveArea notNil and:[lastRootPoint notNil]) ifTrue:[
-        (lastRootPoint = aRootPoint) ifTrue:[
+        (lastRootPoint = rootDisplayPoint) ifTrue:[
             "/ nothing changed
             ^ self
         ].
     ].
 
-    lastRootPoint := aRootPoint.
+    lastRootPoint := rootDisplayPoint.
     "/
     "/ copy from screen to saveUnder
     "/
     rootView clippedByChildren:false.
-    point  := aRootPoint - dragOffset.
+    point  := rootDisplayPoint - dragOffset.
 
     saveArea notNil ifTrue:[
         (     (saveArea left   <= point x)
@@ -393,6 +399,8 @@
     area == saveArea ifTrue:[
         rootView copyFrom:tmpForm toX:area left y:area top. 
     ].
+
+    "Modified: / 15-11-2019 / 11:29:22 / Stefan Reise"
 !
 
 dropTargetWillChange