Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2015-05-06 10:17:40 +0300
committerjfrijters <jfrijters>2015-05-06 10:17:40 +0300
commit8c1f4b82c64ab915af3ca8edc68f449690599b36 (patch)
tree686de2bc22ca215679762fab5a57795966f93594
parentdf62b0786fba26feffd00268d7ae7de7cc873a69 (diff)
Fixed drag-n-drop coordinates. Patch by Daniel Zatonyi <dzatonyi@chemaxon.com>.
-rw-r--r--awt/toolkit-0.95.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/awt/toolkit-0.95.cs b/awt/toolkit-0.95.cs
index 00abb17f..a8a055aa 100644
--- a/awt/toolkit-0.95.cs
+++ b/awt/toolkit-0.95.cs
@@ -1414,7 +1414,11 @@ namespace ikvm.awt
int eventID,
bool dispatchType)
{
- return base.postDropTargetEvent(component, x, y,
+ NetComponentPeer peer = (NetComponentPeer)component.getPeer();
+ Control control = peer.Control;
+ Point screenPt = new Point(x, y);
+ Point clientPt = control.PointToClient(screenPt);
+ return base.postDropTargetEvent(component, clientPt.X, clientPt.Y,
dropAction, actions, formats, nativeCtxt, eventID, dispatchType);
}