JDK-8160241 : Maximizing an Window with Screen-Size hides it
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 8u77,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2016-06-24
  • Updated: 2023-09-25
  • Resolved: 2016-06-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u152Fixed 9Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
This is a critical bug because the user is unable to bring back the window!

@Override
    public void start(Stage stage) {
        Button button = new Button("Click to maximize");
        button.setOnAction(e -> stage.setMaximized(true));
        Rectangle2D bounds = Screen.getPrimary().getVisualBounds();
        stage.setScene(new Scene(new StackPane(button), bounds.getWidth(),
bounds.getHeight()));
        stage.show();
    }
Comments
Raising to P2 given the severity of this bug.
22-09-2016

(It seems that I missed reviewing this one) This is approved to backport to 8u-dev for 8u122. Alexander, if the patch applies cleanly, go ahead and push it. Otherwise, please post a webrev so I can sanity check it.
01-09-2016

http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/69b72753d51f
29-06-2016

The proposed fix works well on my Mac (10.11.5).
29-06-2016

One this is finished and pushed to 9, we might let it bake for a week or two and then consider backporting it to JDK 8u.
28-06-2016

The logic looks good. I'll rely on Chien to double-check on 10.11. Please fix the trailing white space, though: $ bash ./tools/scripts/checkWhiteSpace modules/graphics/src/main/java/com/sun/glass/ui/mac/MacWindow.java :trailingWhitespace: modules/graphics/src/main/native-glass/mac/GlassWindow+Java.m :trailingWhitespace:
28-06-2016

Review request: http://cr.openjdk.java.net/~azvegint/fx/9/8160241/00/ This issue happens when we trying to zoom a window which is already in zoomed state. So this fix keeps in sync java and native maximized states (e.g. currently we do not report that window is maximized by alt + green button). Tested on 10.11.5 and 10.9.5.
28-06-2016

10.11.5
25-06-2016

Attached a complete test program.
25-06-2016

@Tom: what version of OS X are you running? 10.11? I tried it on 10.9 and it doesn't show the bug.
25-06-2016

This is a glass window toolkit bug,
24-06-2016