Integrated: 8316419: [macos] Setting X/Y makes Stage maximization not work before show
Martin Fox
duke at openjdk.org
Wed Nov 1 20:41:13 UTC 2023
On Thu, 12 Oct 2023 05:52:04 GMT, Martin Fox <duke at openjdk.org> wrote:
> When a window is visible the maximized, iconified, and fullscreen properties are two-way streets; changes made in Java are sent on to the platform window and changes in the platform window are sent back into Java.
>
> When a window is hidden these properties (and others, like location and sizing information) are not sent on to the platform window until the window is made visible. In other words, the properties don't reflect the actual state of the window but the intended state after it's shown.
>
> There's a period when the window is transitioning from hidden to shown where the core Stage code is using the stored properties to configure the platform window and the platform window is simultaneously calling back in to update the properties. This was causing the intended state to be wiped out before it could be sent on to the platform window.
>
> The problem is specific to Mac because on that platform any change to the size or location of a window can cause it to enter or leave the maximized (zoomed) state. So just setting the location can cause the maximized flag to be altered.
>
> The proposed solution is to copy the intended state bits to Stage local variables to be used later in the configuration.
This pull request has now been integrated.
Changeset: f41e3ec0
Author: Martin Fox <beldenfox at users.noreply.github.com>
Committer: Andy Goryachev <angorya at openjdk.org>
URL: https://git.openjdk.org/jfx/commit/f41e3ec02bdbdff1417ed20b8e02645348825e4d
Stats: 24 lines in 3 files changed: 16 ins; 8 del; 0 mod
8316419: [macos] Setting X/Y makes Stage maximization not work before show
8255835: [macOS] Undecorated stage cannot be maximized
8305675: [macos] Stage set to iconified before being shown is displayed on screen
Reviewed-by: lkostyra, angorya
-------------
PR: https://git.openjdk.org/jfx/pull/1258
More information about the openjfx-dev
mailing list