On Sat, 22 Apr 2023 18:41:53 GMT, Thiago Milczarek Sayao <tsa...@openjdk.org> 
wrote:

>> Thiago Milczarek Sayao has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Revert "The window could start iconified."
>>   
>>   This reverts commit f92e25cbcc24fd772b9d6bb25a92386ec0561313.
>
> Now I see that the call will actually get delayed.
> 
> `javafx.stage.Window` will do the calls when the window will be shown(). On 
> line 1162 `WindowStage.setScene` is called:
> 
> 
> peer.setScene(SceneHelper.getPeer(getScene()));
> 
> 
> but this is only called on line 1186:
> 
> 
> peer.setVisible(true);
> 
> 
> The configuration of Window properties (iconified, maximized, etc) will start 
> on line 1212:
> 
> 
> WindowHelper.visibleChanged(Window.this, newVisible);
> 
> 
> which will fall into `Stage` line 1178 `doVisibleChanged`.
> 
> I think this is the right place to call `requestFocus` if the window is not 
> minimized/iconified.
> 
> Calling `requestFocus` on `setScene`  will cause an initially iconified 
> window to be shown (actually pop on the screen) and then be iconified.

> @tsayao Unrelated to this PR, but I see that your master is [38 commits 
> ahead](https://github.com/tsayao/jfx/compare/openjdk:jfx:master...master) of 
> openjdk:master. This is causing that for every new branch and PR that you 
> create, those commits (the first 30 ones date from 3 years ago!) are always 
> added to it. Could you reset your local master branch to the upstream version?

I was wondering about that (I was not sure how to do it). Fixed it for the next 
PR.

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

PR Comment: https://git.openjdk.org/jfx/pull/1110#issuecomment-1520948936

Reply via email to