#FEATURE by Stefan Reise
support scaled/virtual displays
class: DragHandler::Opaque
changed: #dragTo:
--- 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