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.

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

Commit messages:
 - Removed code that was building an NSRect verbatim from an existing NSRect
 - No longer querying Objective-C stack to determine window frame coordinate 
system

Changes: https://git.openjdk.org/jfx/pull/1749/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1749&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8352999
  Stats: 23 lines in 2 files changed: 1 ins; 19 del; 3 mod
  Patch: https://git.openjdk.org/jfx/pull/1749.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1749/head:pull/1749

PR: https://git.openjdk.org/jfx/pull/1749

Reply via email to