RFR: 8352999: [macOS] Conditional behavior by directly querying the Objective-C call stack

Kevin Rushforth kcr at openjdk.org
Tue Apr 1 18:21:07 UTC 2025


On Mon, 31 Mar 2025 18:29:21 GMT, Martin Fox <mfox at openjdk.org> wrote:

> Before a window is maximized glass records its existing size and location. This rectangle is stored in native screen coordinates. Compared to Java screen coordinates native coordinates are flipped along the Y axis.
> 
> When the window is un-maximized that native rectangle is passed to a routine that normally takes Java screen coordinates. To determine whether the rectangle is flipped or not the code inspects the Objective-C stack to figure out which routine called it.
> 
> At the risk of re-writing working code this PR takes a more conventional approach to the problem.
> 
> I’ve also re-enabled the related system test. I had to increase the animation delay to get it to pass on the Mac. 400 milliseconds is enough but 500 gives us some headroom.

Seems like a good idea to get rid of what looks like very "questionable" code.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1749#issuecomment-2770317924


More information about the openjfx-dev mailing list