RFR: 8306121: Scene not rendered initially when changing scenes after fix for JDK-8296621 [v4]

Kevin Rushforth kcr at openjdk.org
Tue Jun 13 17:46:56 UTC 2023


On Mon, 24 Apr 2023 11:25:28 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

>> 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?

@jperedadnr This should now be ready for you to resume your review.

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

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


More information about the openjfx-dev mailing list