<Swing Dev> RFR: 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI) [v2]
Sergey Bylokhov
serb at openjdk.java.net
Thu Oct 29 00:03:49 UTC 2020
On Wed, 28 Oct 2020 17:34:07 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>>
>> - Merge branch 'master' into JDK-8211999
>> - Update FullscreenWindowProps.java
>> - Merge branch 'master' into JDK-8211999
>> - Fix fullscreen in HiDPI mode
>> - self review
>> - Initial fix version
>
> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 2217:
>
>> 2215: y = y < bounds.top ? bounds.top : y;
>> 2216: x = (x + w > bounds.right) ? bounds.right - w : x;
>> 2217: y = (y + h > bounds.bottom) ? bounds.bottom - h : y;
>
> Can't this adjustment cause `x`, `y` to become less than `bounds.left` and `bounds.top` correspondingly?
> Shall it adjust the width and height?
Yes, if the size of the window is bigger than the screen it will be moved to the left. I am not sure is it good to scale down the size in this case or not, so I left the logic the same as before. These lines are not new, only whitespaces are changed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/375
More information about the swing-dev
mailing list