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

[macOS] Restoring a maximized stage does not update the window size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • jfx22
    • javafx
    • None
    • macOS 15.4.1, M2 Studio

      Using the setMaximized(false) call on a stage will restore the window but the width and height properties will not be updated to reflect the new size.

      You can reproduce this with the attached test file. Press the Maximize button twice to maximize and then restore the test stage. The width property will remain at the maximized size.

      The test case shows a log of how various properties change during the animation which reveals a number of other underlying problems. At the start of the animation the size appears to change immediately to the final size and then a series of move notifications are sent out during the animation. While this is going on the maximized flag can change state more than once.

      You can also see anomalies if you maximize and restore using the platform controls. At the very start of the animation the size is updated to the final size. Then a series of correct move and size events are sent out until the animation ends.

      To use the platform controls you may have to go to System Settings > Desktop & Dock. For "Double-click a window's title bar to" select "Zoom". Then use double-clicks to zoom and unzoom the window.

            mfox Martin Fox
            mfox Martin Fox
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: