<AWT Dev> [9] Review request for 8147440 HiDPI (Windows): Swing components have incorrect sizes after changing display resolution
Alexander Stepanov
alexander.v.stepanov at oracle.com
Fri Feb 5 11:34:36 UTC 2016
Thanks!
On 2/5/2016 1:55 PM, Alexander Scherbatiy wrote:
> On 05/02/16 12:59, Alexander Stepanov wrote:
>> Hello Alexandr,
>>
>> WRT WindowResizingOnDPIChangingTest - I have quite similar manual
>> test on review:
>> http://mail.openjdk.java.net/pipermail/awt-dev/2016-January/010569.html
>> (but it requires two-display configuration).
>>
>> Could these tests coexist later on? I hope they are not full duplicates.
> Yes, the MultiDisplayTest always requires at least 2 display but
> WindowResizingOnDPIChangingTest can be used for display DPI changing
> only on one monitor. I think they both can coexist.
>
> Thanks,
> Alexandr.
>>
>> (and now we come here, could please anyone review it?)
>>
>> Thanks,
>> Alexander
>>
>>
>>
>> On 2/5/2016 10:52 AM, Alexandr Scherbatiy wrote:
>>>
>>> Hello,
>>>
>>> Could you review the fix:
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8147440
>>> webrev: http://cr.openjdk.java.net/~alexsch/8147440/webrev.00/
>>>
>>> When Display DPI is changed the Windows OS rescales a native
>>> window size but leaves a native window location the same.
>>> Java frame size and location are calculated as
>>> nativeWindow.location = scale * javaWindow.location
>>> nativeWindow.size = scale * javaWindow.size
>>>
>>> The first approach is to rescale only frame size on native level so
>>> newNativeWindow.size = newScale * javaWindow.size
>>> This allows to leave the nativeWindow.location unchanged but the rule
>>> nativeWindow.location = newScale * javaWindow.location
>>> will be broken in this case.
>>>
>>> The proposed fix explicitly rescales javaWindow.location in
>>> WWindowPeer so
>>> nativeWindow.location = prevScale * prevJavaWindow.location =
>>> newScale * newJavaWindow.location
>>>
>>> Thanks,
>>> Alexandr.
>>>
>>
>
More information about the awt-dev
mailing list