You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MonitorAwarePoint and MonitorAwareRectangle classes have been
introduced as specializations of the existing Point and Rectangle
classes solely to support monitor-specific scaling and only used in the
context of that feature. They are not supposed to be used outside of SWT
but just an internal construct. However, instances of those classes
reach consumers of SWT API, e.g., via the Shell class. This broke
equality assumptions for consumers, as, e.g., a comparison between a
Point and a MonitorAwarePoint (returned by methods of Shell) are never
equal, even though the consumers is not supposed to even know that a
MonitorAwarePoint can be returned here.
To restore equality, this change aligns equality of the monitor-aware
implementations of point and rectangle with their original
implementations. In consequence, a Point and a MonitorAwarePoint will be
considered equal if their x/y coordinates match. The monitor stored in a
MonitorAwarePoint will be ignored. This analogously applies to
MonitorAwareRectangle. Since those classes are only used internally, no
one may rely on any other kind of equality specification for the
monitor-aware implementations of point and rectangle, but existing
equality for Points and Rectangles in general is restored.
0 commit comments