RFR: JDK-8326619: Stage.sizeToScene() on maximized/fullscreen Stage breaks the Window
Kevin Rushforth
kcr at openjdk.org
Wed Feb 28 23:45:51 UTC 2024
On Mon, 26 Feb 2024 20:51:56 GMT, Marius Hanl <mhanl at openjdk.org> wrote:
> This PR fixes the problem that maximizing/fullscreen a `Stage` or `Dialog` is broken when `sizeToScene()` was called before or after.
>
> The approach here is to ignore the `sizeToScene()` request when the `Stage` is maximized or set to fullscreen.
> Otherwise the Window Manager of the OS will be confused and you will get weird flickering or wrong Window buttons (e.g. on Windows, the 'Maximize' button still shows the 'Restore' Icon, while we already resized the `Stage` to not be maximized).
This seems like a reasonable fix and spec change. Have you tested the case of calling sizeToScene before setting full-screen or maximzed? Since the pending flag will still be set in that case, I want to make sure that case is tested as well.
Also, if this fixed [JDK-8316425](https://bugs.openjdk.org/browse/JDK-8316425), then that bug should be closed as a duplicate of this one.
@lukostyra @arapte can you also review this?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1382#issuecomment-1970103785
More information about the openjfx-dev
mailing list