<Swing Dev>  RFR:JDK-8176359: Frame#setMaximizedbounds not working properly in multi screen environments
Sergey.Bylokhov at oracle.com
Fri Jun 29 20:09:42 UTC 2018
> Also, while running the testcase, I discovered that the
> -Dsun.java2d.uiScale=1.25 will uniformly apply the scaling across all
> the screens, whereas if the underlying monitor is not scaled, the
> results will be different.
> Hence I modified the test to remove the uiScale settings related tests.
I suggest to add it back. The case when the bug can be reproduced
depends from the real screen resolution. If such resolution is set then
the bug should not depend from the scales of the screens, because
internally we will convert the scaled coordinates to the real pixels and
it does not matter what scale is used in java.
There some questionable places in the fix:
- 106 b = scaleBounds(b, currScaleX, currScaleY); Why the scale of the
current screen is used? I guess we need to find on which screen this "b"
is located and then use its scale. Check implementation of
- Is it intentional to assign to "b" a values from "primaryDevBounds",
which was not scaled? So in some cases the "b" will have scaled values
and in some cases not.
125 b.width = primaryDevBounds.width;
130 b.height = primaryDevBounds.height;
134 b.x = primaryDevBounds.x;
138 b.y = primaryDevBounds.y;
Best regards, Sergey.
More information about the swing-dev