On Thu, 20 Oct 2022 14:37:04 GMT, Johan Vos <j...@openjdk.org> wrote:
> The root problem is actually broader than stated in the JBS issue. This PR > now translates screencoordinates from absolute coordinates into coordinates > that take the platformScale into account. > The whole process is complicated by the fact that throughout our code, we use > e.g. `x` and `y` without clearly stating if those are absolute, logical, > screen or rendering coordinates. > I believe the most consistent approach is to have the different entry points > (e.g. a Glass Window or a JFXPanel) to deal with platformScale before passing > screen coordinates. This is already done in the Glass approach, and this PR > does the same in JFXPanel. That means some code is duplicated, but since this > is only about 12 lines, and said code lives in 2 different modules, I think > it's not worth the hassle of moving that into e.g. the base module. This pull request has now been integrated. Changeset: f4e27e9d Author: Johan Vos <j...@openjdk.org> URL: https://git.openjdk.org/jfx/commit/f4e27e9d37439716455838671d2f06b8aca1d236 Stats: 54 lines in 2 files changed: 49 ins; 0 del; 5 mod 8222210: JFXPanel popups open at wrong coordinates when using multiple hidpi monitors Reviewed-by: kcr, angorya ------------- PR: https://git.openjdk.org/jfx/pull/924