On Windows, the reported width and height of a Stage correspond to the window size as returned by GetWindowRect.
Up until Windows 10, the size of a window was identical to its visual borders. However, since Windows 10 has thin visual window borders, the window manager adds an invisible border of a few pixels around the window to make it easier to resize the window. Since GetWindowRect returns the window size _including_ these invisible borders, the location and size of a Stage isn't exactly what we'd expected.
For example, if we place a Stage at setX(0) and setY(0), the window appears with a small distance from the screen edge (see window-size-1.png).
What we actually want is to have the visual borders line up with the edges of the screen (see window-size-2.png).
Up until Windows 10, the size of a window was identical to its visual borders. However, since Windows 10 has thin visual window borders, the window manager adds an invisible border of a few pixels around the window to make it easier to resize the window. Since GetWindowRect returns the window size _including_ these invisible borders, the location and size of a Stage isn't exactly what we'd expected.
For example, if we place a Stage at setX(0) and setY(0), the window appears with a small distance from the screen edge (see window-size-1.png).
What we actually want is to have the visual borders line up with the edges of the screen (see window-size-2.png).
- links to
-
Review(master)
openjdk/jfx/1982