On Tue, 2 Dec 2025 19:01:11 GMT, Martin Fox <[email protected]> wrote:
> I haven't uncovered any problems so far but it took me a while to get my > bearings. You're working with two coordinate systems, the one used by JavaFX > which doesn't include the invisible border and the one used by Windows which > does. The naming convention is confusing since the "extended" rectangle is > actually the smaller of the two. It would also be good to see some comments > clarifying that `m_insets`, `m_maxSize`, and `m_minSize` are all specified in > the JavaFX system. I don’t think it’s quite "two coordinate systems" (JavaFX vs Windows). `Stage.width/height` are intended to include the normal system decorations (title bar + borders), which historically also matches what people mean by "window size": it includes the non-client area, but not purely visual effects like drop shadows. The weirdness on Windows 10+ is that GetWindowRect started including an extra invisible resize border that’s not part of the visible frame, so the window ends up being reported a few pixels larger than it looks. Using `DwmGetWindowAttribute(DWMA_EXTENDED_FRAME_BOUNDS)` is basically a way to get the visually perceived bounds back. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1982#issuecomment-3603720855
