DESCRIPTION

Bug 491176 - Wrong logic in WBWRenderer for correcting offscreen Shells

Change-Id: I3e39d7104042c18f62bfa0805ef12e570f1ae2fb
Signed-off-by: Kelly Potter xxx@xxx.xxx


COMMENTS

author: Kelly Potter
date: 2016-04-07 20:04:29.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2016-04-07 20:04:35.000000000

Patch Set 3:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8923/

-------------------------------------
author: Brenden Conley
date: 2016-04-07 20:29:33.000000000

Patch Set 3: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/8923/ : SUCCESS

-------------------------------------
author: Brock Pruitt
date: 2016-04-08 01:42:23.000000000

Patch Set 3:

(1 comment)

Line:478, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java -> Distance to the center of a monitor is not a good measure of proximity to the monitor itself. Consider an example of two monitors of different sizes. Distance to the center of the larger one can be larger when the distance to its closest point is smaller.

-------------------------------------
author: Kelly Potter
date: 2016-04-08 02:05:12.000000000

Patch Set 3:

(1 comment)

Line:478, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java -> That doesn't matter at all. The point of this method isn't to locate the monitor whose perimeter has the shortest distance to the point. It just needs to select a monitor that is reasonably close to the selected point and the monitor closest to the midpoint is a fine heuristic.

In the cases where this would make a difference (monitors forming a concave or disconnected region), the choice of which monitor to select is pretty much arbitrary and any monitor that is reasonably close is good enough.

This is exactly the same algorithm from Window.getClosestMonitor() uses (along with every other place in Eclipse that makes decisions about monitor selection) and it's worked very well in practice.

-------------------------------------
author: Brock Pruitt
date: 2016-04-08 02:10:53.000000000

Patch Set 3: Code-Review+1

(1 comment)

Line:478, bundles/org.eclipse.e4.ui.workLeon Ochoach.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java -> I agree that this algorithm is probably good enough, but don't see a major technical difficulty in doing a more accurate measurement. The concave case is pretty common when attaching an external monitor to a laptop.

-------------------------------------
author: Kelly Potter
date: 2016-04-08 02:18:18.000000000

Patch Set 3: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2016-04-08 02:18:21.000000000

Project policy requires all submissions to be a fast-forward.

Please rebase the change locally and upload again for review.

-------------------------------------
author: Kelly Potter
date: 2016-04-08 02:18:26.000000000

Patch Set 4: Patch Set 3 was rebased

-------------------------------------
author: Gerrit Code Review
date: 2016-04-08 02:18:39.000000000

Change has been successfully merged into the git repository by Kelly Potter

-------------------------------------
