This PR fixes an issue when dragEvents occur in a secondary screen which 
doesn't have the same height or (macOS) origin as the main screen.

The calculations for `xAbs, yAbs` are defined from the main screen macOS 
absolute origin, an in order to flip the coordinates defined from the JavaFX 
origin, the height from the main screen should be used, and not the height from 
secondary screens, which was the case in `GlassViewDelegate::sendJavaDndEvent`.

The PR doesn't include tests because it needs a complex setup (two monitors), 
but the change has been tested on macOS 15.3.2 with the test case from 
https://bugs.openjdk.org/browse/JDK-8353548, using two monitors (built-in 
Retina and external 4K display), rearranging their layout (left-bottom-right 
from main screen), and relative resolution.

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

Commit messages:
 - Use correct screen to calculate yAbs in a dragEvent

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

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

Reply via email to