Make MonitorAwarePoint a windows-specific implementation detail
#1903
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PointandRectanglepart of a sealed class hierarchy which addedMonitorAwarevariantsPointorRectanglefrom Kotlin, because Kotlin does not allow the base of a sealed hierarchy to be one of the elementsx, yvalues, but not be equal. For example, take a point, map it to a control, map it back, you'll get the same coordinates you started with, but.equalswill be false now because one of the points will be aMonitorAware. This behavior only happens on Windows.I'm proposing two PRs. This, the first one, doesn't fix the muddled equality bug, but it makes
MonitorAwarea package-private implementation detail that only affects the win32 platform.The second one (#1904) removes
MonitorAwareand replaces it with logic that is contained within theMultiZoomCoordinateMapper. As of SWT in the release 4.35, these newMonitorAwarevariants are created in exactly two places.eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MultiZoomCoordinateSystemMapper.java
Line 155 in e1f11c9
eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MultiZoomCoordinateSystemMapper.java
Line 264 in e1f11c9