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

[Win] Incorrect position and size after hiding iconified stage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • jfx26
    • jfx22
    • javafx
    • None

      On Windows if you hide a stage while it's iconified the x, y, width, and height properties will be set to invalid values.

      When an HWND is iconified GetWindowRect returns a rect that no longer reflects the size and position of the un-iconified window. We should not report size or position changes based on this rect. There are already places in the native glass code where we check for this using IsIconic but we missed one (while processing WM_SHOWWINDOW).

      To reproduce, run the attached test case and inspect the output. The x and y properties will be set to large negative numbers and width and height will be altered to smaller values. The exact values depend on your display's magnification settings.

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

              Created:
              Updated: