smoother ProgressDialog moving when EDT is not very responsive

This commit is contained in:
peter
2016-12-14 15:54:59 +01:00
parent 1b23d3461b
commit a868a640d5
@@ -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;