Integrated: 8371302: [Windows] Stage coordinates in secondary display are not properly updated after changing settings of first display

Jose Pereda jpereda at openjdk.org
Mon Nov 10 09:11:21 UTC 2025


On Wed, 5 Nov 2025 11:44:40 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

> This PR handles two windows events, `WM_DISPLAYCHANGE` and `WM_SETTINGCHANGE`, that can be received by a JavaFX Window on a given display when other display changed its settings (resolution), or both displays were rearranged, and therefore its location has changed. 
> 
> When this happens, `com.sun.glass.ui.Window` has the new updated location, but the `javafx.stage.Window` does not, and triggering a `Window.MOVE` event notifies the stage to update its location accordingly.
> 
> There are no tests added to this PR (those would require two monitors, and external changes of Windows Settings), but the [test](https://bugs.openjdk.org/secure/attachment/116917/RenderScaleTest.java) attached to the JBS issue passes after this PR running some manual tests: for the stage at secondary display, check that the location is updated properly and the context menu shows up at the expected position, when the primary display resolution changes via Settings->System->Display->Scale, or when both displays are rearranged via Settings->System->Display->Drag to rearrange.

This pull request has now been integrated.

Changeset: d1660230
Author:    Jose Pereda <jpereda at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/d1660230d21ce8a27db8dae9b0f1088b8e29faeb
Stats:     7 lines in 1 file changed: 7 ins; 0 del; 0 mod

8371302: [Windows] Stage coordinates in secondary display are not properly updated after changing settings of first display

Reviewed-by: angorya, kcr

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

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


More information about the openjfx-dev mailing list