Hi,

JavaFX allows setting the stage's width, height, and position (X, Y) when
it is maximized or in fullscreen mode, without ignoring the values or
throwing an exception.

The current documentation states the following regarding X, Y, Width,
Height, and sizeToScene:

Changing this attribute will not visually affect a Stage while fullScreen is
true, but will be honored by the Stage once fullScreen becomes false. This
value includes any and all decorations which may be added by the Operating
System such as resizable frame handles. Typical applications will set the
Scene <https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Scene.html>
width
instead.
It doesn’t mention anything about the maximized state, which I believe is a
similar case.

Martin did some tests on Mac and Windows when resizing while Maximized, and
it seems inconsistent between platforms.

https://github.com/openjdk/jfx/pull/1748#issuecomment-2764224914

On Linux, when setting the width or height while in fullscreen mode, GTK
simply ignores the request and maintains the size the window had before
entering fullscreen.
I tried to work around this to align with the documentation, but it’s
harder than it looks due to the asynchronous nature of X11.

Depending on how different platforms behave, it might be worth revisiting
the documentation and aligning behaviors where possible to ensure
consistency.

-- Thiago.

Reply via email to