<AWT Dev> RFR: 8225126 Test SetBoundsPaintTest.html faild on Windows when desktop is scaled
alexey.ivanov at oracle.com
Thu Feb 6 20:24:18 UTC 2020
On 06/02/2020 20:12, Sergey Bylokhov wrote:
> On 2/6/20 11:45 am, Alexey Ivanov wrote:
>> 233 int borderHeight = ScaleDownY(::GetSystemMetrics(SM_CYBORDER));
>> Documentation says GetSystemMetrics always returns the value for the
>> primary monitor. Shall we still scale the value down? Or it will be
>> compensated by the following ScaleUpY in ResetDropDownHeight?
> I am not sure that this constant is related to the primary monitor
> only. The spec for SM_CYBORDER does not mention the primary monitor
> like some others SM_CYMAXIMIZED/SM_CYSCREEN etc.
It's stated here:
The GetSystemMetrics function returns values for the primary monitor,
except for SM_CXMAXTRACK and SM_CYMAXTRACK, which refer to the entire
> We use this value as-is for all monitors, in java we scale value
> and if passed back to native we convert it again by ScaleUpY like in
Does it mean ScaleDownY at line 233 is not required then?
Or the fact that we scale the value in Java means we have to scale the
value obtained from the native, right?
More information about the awt-dev