Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8133698

[Linux] Stage.setResizable(false) does not prevent window resize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u51
    • javafx

      FULL PRODUCT VERSION :
      java version "1.8.0_51"
      Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux xxxx 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Ubuntu 14.04 LTS, x64 desktop.

      A DESCRIPTION OF THE PROBLEM :
      Setting stage.setResizable(false); will only remove the "minimize" and "maximize" window decorators (which is expected).

      It will not prevent the window from being resized using the mouse, via dragging the edge/corner.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Then, using the mouse by clicking on the border of the window, you can resize the stage.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I would expect the same behavior as Windows/Mac, where the stage is not resizable.
      ACTUAL -
      The stage can be resized using the mouse, and it shouldn't be.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Stacktrace indicates that the (native) GTK windowing sub-system is still registered for window resize events.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
            class stageTest {
                  public
                  stageTest() {
                      final Stage stage = new Stage(StageStyle.UTILITY);
                      stage.setTitle("RESIZE TEST");
                      stage.setWidth(300);
                      stage.setHeight(140);
                      stage.setResizable(false);

                      stage.showAndWait();
                  }
              }

              final stageTest stageTest = new stageTest();
      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: