-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Minimal risk as it is unlikely that any user relies on this behaviour.
-
Java API
-
JDK
Summary
Do not allow the sizeToScene() request when a Window is maximized or in fullscreen mode. Document the behavior.
Problem
When a developer or the JavaFX framework (Dialog) calls sizeToScene() on a maximized or fullscreen Window, the whole Window will break. This looks a little bit different on every OS, but is broken in every case.
Solution
To address this issue, the sizeToScene() request should be ignored (but remembered) when the Window is maximized of in fullscreen mode. This behavior should also be documented on the sizeToScene() method.
Specification
~ javafx.stage.Window
/**
* Set the width and height of this Window to match the size of the content
* of this Window's Scene.
* <p>This request might be ignored if the Window is not allowed to do so, for example a {@link Stage}
* may be {@code maximized} or in {@code fullScreen} and therefore does not allow this request.
* If that is the case, this request is remembered and reapplied later when allowed.</p>
*/
public void sizeToScene() {
- csr of
-
JDK-8326619 Stage.sizeToScene() on maximized/fullscreen Stage breaks the Window
-
- Resolved
-