RFR: 8326619: Stage.sizeToScene() on maximized/fullscreen Stage breaks the Window [v8]

Kevin Rushforth kcr at openjdk.org
Tue Jul 2 21:06:26 UTC 2024


On Thu, 27 Jun 2024 11:49:04 GMT, Marius Hanl <mhanl at openjdk.org> wrote:

>> Change looks good, but I'm still seeing failures on my macOS system (Sonoma 14.5, MacBook Pro M1 Max):
>> 
>> 
>> SizeToSceneTest > testInitialSizeOnSizeToSceneThenFullscreen() FAILED
>>     org.opentest4j.AssertionFailedError: 1080.0 >= 1085.0 ==> expected: <true> but was: <false>
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
>>         at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
>>         at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:76)
>>         at app//test.javafx.stage.SizeToSceneTest.testInitialSizeOnSizeToSceneThenFullscreen(SizeToSceneTest.java:150)
>> 
>> SizeToSceneTest > testInitialSizeAfterShowFullscreenThenSizeToScene() FAILED
>>     org.opentest4j.AssertionFailedError: 1080.0 >= 1085.0 ==> expected: <true> but was: <false>
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
>>         at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
>>         at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:76)
>>         at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowFullscreenThenSizeToScene(SizeToSceneTest.java:186)
>> 
>> SizeToSceneTest > testInitialSizeAfterShowSizeToSceneThenFullscreen() FAILED
>>     org.opentest4j.AssertionFailedError: 1080.0 >= 1085.0 ==> expected: <true> but was: <false>
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
>>         at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
>>         at app//test.javafx.stage.SizeToSceneTest.assertStageScreenBounds(SizeToSceneTest.java:76)
>>         at app//test.javafx.stage.SizeToSceneTest.testInitialSizeAfterShowSizeToSceneThenFullscreen(SizeToSceneTest.java:162)
>> 
>> SizeToSceneTest > testInitialSizeOnFullscreenThenSizeToScene() FAILED
>>     org.opentest4j.AssertionFailedError: 1080.0 >= 1085.0 ==> expected: <true> but was: <false>
>>         at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
>>         at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
>>         at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:210)
>>         ...
>
>> Change looks good, but I'm still seeing failures on my macOS system (Sonoma 14.5, MacBook Pro M1 Max):
> 
> ~I'm confused, the screen height is reported as 1085? ...~
> 
> Search the web led me to this:
> Browser size for Mac:
> 1920 -> 1903  | 1200 -> 1085
> 
> So it looks like JavaFX is using 1080 for whatever reason while the visible bounds are 1085. Weird, but my next push will add a delta now.

@Maran23 This is ready for you to integrate now.

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

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


More information about the openjfx-dev mailing list