Xpra: Ticket #1802: Wrong window position with JavaFX

Hi.

I saw some issues that are related, but I didn't find the exact one, so I apologize if this is a duplicate. I found, that when using --html5, window position of JavaFX application is at bottom right (regardless of browser window size). I attached monkey patch which fixes this issue (override window position to x=0, y=0).

Test command (which works without patch): xpra start --exit-with-children=yes --daemon=no -z0 :1 --bind-tcp=0.0.0.0:8080 --html=on --start-child='xeyes'

Test command of JavaFX application (which hash wrong window position without of the patch): xpra start --exit-with-children=yes --daemon=no -z0 :1 --bind-tcp=0.0.0.0:8080 --html=on --start-child='java -jar /tmp/demos/jdk1.8.0_161/demo/javafx_samples/Modena.jar'


System info:

- tested in docker container centos:7.3.1611
- output of showconfig in the attachment
$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
[builder@achict ~]$
$ xpra --version
xpra v2.2.6-r18968

Regards



Thu, 05 Apr 2018 09:22:23 GMT - predkambrij: attachment set


Thu, 05 Apr 2018 09:22:34 GMT - predkambrij: attachment set


Thu, 05 Apr 2018 09:23:10 GMT - predkambrij: component changed


Sat, 07 Apr 2018 09:12:09 GMT - Antoine Martin: status changed; resolution set

Java is known to do weird things with how it manages its windows. In this case, running this "Modena" example, it:

With some extra calls I have omitted here (ie: figuring out the frame extents, etc) So basically, it figures out the center of the vfb and places its window there.

And this is exactly what we honour in the client, both in the python client and in the html5 client. Except the window manager then ensures that the window is at least partially visible if the coordinates end up off-screen. So, we won't be fixing this in xpra, but you have some workarounds available:


Mon, 09 Apr 2018 08:29:51 GMT - predkambrij:

Hi

Thank you for the feedback. The second workaround doesn't work for me, but the first one does, but it has different behavior (obviously).

Br


Sat, 23 Jan 2021 05:34:10 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1802