requestFocus on setScene - is it right?

Thiago Milczarek Sayão thiago.sayao at gmail.com
Sun Nov 6 23:32:36 UTC 2022


Hi,

While working on native linux glass code I observed that requestFocus() is
called before show().
If the window is not shown (mapped on Xorg), It can't be focused.

The code is on WindowStage.setScene() line 276.

It might be the case when switching the scene, but should the window be
focused in that case?

If the user is "focused" on another window and the program decides to
switch the scene the window would pop and steal the focus.

Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20221106/d9152057/attachment-0001.htm>


More information about the openjfx-dev mailing list