[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: JDK-8326619: Stage.sizeToScene() on maximized/fullscreen Stage breaks the Window
From:       Kevin Rushforth <kcr () openjdk ! org>
Date:       2024-02-29 0:27:53
Message-ID: Pqs02KqjxrR08UiH_lkphb-Fr4uPtGliNoSlUpcEOxQ=.00bc179c-b70c-4bf4-940b-c731ce7f45d6 () github ! com
[Download RAW message or body]

On Mon, 26 Feb 2024 20:51:56 GMT, Marius Hanl <mhanl@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).

Btw, I get the following test failures on our headful Linux test systems:


SizeToSceneFullscreenTest > testInitialSizeFullscreen FAILED
    java.lang.AssertionError: Stage height expected:<1080.0> but was:<1117.0>
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotEquals(Assert.java:835)
        at org.junit.Assert.assertEquals(Assert.java:555)
        at test.javafx.stage.SizeToSceneFullscreenTest.testInitialSizeFullscreen(SizeToSceneFullscreenTest.java:78)



This seems unrelated to your fix. I think the problem might be that in full-screen \
mode the stage can be bigger than the visible screen size or maybe the decorations \
are just larger on that system. You might either need to increase the tolerance \
values or instead check for >= visible width / height (possibly with some small \
tolerance).

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1382#issuecomment-1970158754


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic