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

[linux] setResizeable on Stage causes the window to become unusable

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "9.0.4"
      Java(TM) SE Runtime Environment (build 9.0.4+11)
      Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)



      ADDITIONAL OS VERSION INFORMATION :
      Linux depsn116.inaf.cnrs-gif.fr 4.15.5-1-default #1 SMP PREEMPT Thu Feb 22 21:48:29 UTC 2018 (52ce732) x86_64 x86_64 x86_64 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      OpenSuSE Tumbleweed
      KDE desktop
      Using Scala 2.12.4

      A DESCRIPTION OF THE PROBLEM :
      When using the setResizable function on the primary stage, the stage becomes unviewably small. The elements within are not visible, and neither are window decorations and close buttons. I've attached minimal reproducible code here: https://pastebin.com/dmhJqfrT

      Here are some images of what's happening on my desktop with a JavaFX9 application I'm developing.

      setResizable(true):

      https://i.imgur.com/k41vU25.png

      setResizable(false):

      https://i.imgur.com/p8rIPHi.png


      REGRESSION. Last worked in version 8u162

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_162"
      Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      set the primary stage to unresizable.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The maximize button should disappear and the stage should not be resizable, but be the appropriate size for its content.

      Something kind of like this:
      https://i.imgur.com/k41vU25.png
      ACTUAL -
      The maximize and all other windowing buttons disappear, and while the stage is not resizable, it's also not big enough to display ANY of it's content

      https://i.imgur.com/p8rIPHi.png

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      There are no error messages

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javafx.application.{Application => JavaFXApplication}
      import javafx.scene.Scene
      import javafx.scene.layout.Pane
      import javafx.scene.control.Button
      import javafx.stage.Stage
       
      class SetResizableExample extends JavaFXApplication {
        override def start(primaryStage: Stage): Unit = {
          primaryStage.setTitle("SuperCopyMan 2")
          val pane = new Pane()
          val button = new Button("click me")
       
          pane.getChildren.add(button)
       
          val scene = new Scene(pane, 500, 400)
          primaryStage.setScene(scene)
          primaryStage.setResizable(false)
          primaryStage.show()
       
        }
      }
       
      object SetResizableExample {
        def main(args: Array[String]): Unit = {
          JavaFXApplication.launch(classOf[SetResizableExample])
        }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None. I have tried using stage.sizeToScene() and it has no effect whatsoever.

        1. k41vU25.png
          k41vU25.png
          29 kB
        2. p8rIPHi.png
          p8rIPHi.png
          3 kB
        3. setResizable.jdk10.log
          3 kB
        4. setResizable.jdk11.log
          3 kB
        5. SetResizableExample_scala_9.0.4+11.png
          SetResizableExample_scala_9.0.4+11.png
          101 kB
        6. SetResizableExample.scala
          0.8 kB

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

              Created:
              Updated: