From a868a640d5493176c538a388cdce6013e71cd6ba Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 14 Dec 2016 15:40:37 +0100 Subject: [PATCH] smoother ProgressDialog moving when EDT is not very responsive --- .../com/intellij/openapi/progress/util/ProgressDialog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.java b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.java index e458a800308f..1bfefde448d2 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/ProgressDialog.java @@ -170,7 +170,9 @@ class ProgressDialog implements Disposable { if (myLastClicked == null) { return; } - final Point draggedTo = new RelativePoint(e).getScreenPoint(); + // use absolute location, because the relative point was set when creating the event, and the dialog might have been moved since that + // (e.g. if processing of previous events was delayed by something) + final Point draggedTo = e.getLocationOnScreen(); draggedTo.x -= myLastClicked.x; draggedTo.y -= myLastClicked.y;