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.
(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.