Linux - different behaviour of docks
Rabcan opened this issue · 4 comments
Drag & drop of docks behaves completely differently under the Linux. Mostly it freezes or cant move with dock. I assume that these bugs are caused by openjfx 12 JDK and GTK version of Linux. So, I tried GTK 2 and GTK 3 for JavaFX. GTK 2 is better, applications work there (with some bugs). But with GTK 3, DockFX is not usable. Has Anybody similar experience? Is there some fix, or should I downgrade openjfx?
Need to note, windows does not suffer from similar issues.
How does OpenJFX behave outside of DockFX on its own? I have experienced issues like this for many years with a Java Swing application when it was used under OpenJDK, and a lot of these issues we were never able to workaround or resolve. I can't really say much to this honestly, but anybody is free to investigate causes of specific issues and I will consider doing things different where possible if it improves the experience of using the library on those JDKs.
OpenJDK is, as of Java 9, the reference implementation, so if you're not testing on it I would consider that a significant part of the problem.
I've just gotten into JavaFX development this week, so that's all I've got, but any issues related to OpenJDK should definitely be considered valid.
This is a great looking library and I have successfully run the sample application on macOS. However, under Linux, I have been having similar problems to those reported above.
I'm using Ubuntu 18.04, OpenJFX 17.0.0.1 and OpenJDK 17.
I have experienced issues like this for many years with a Java Swing application when it was used under OpenJDK, and a lot of these issues we were never able to workaround or resolve.
I think you may be suggesting that the Oracle JDK might work better than OpenJDK. Unfortunately, I've now tested the Oracle JDK version 17 and found it to have the same issues.
At first, the sample app shipped with DockFX seems fully functional. However, as soon as I try to drag docks, they became "stuck" close to their initial position and can't be moved further. As an apparent result of the drag-and-drop operation not completing, the placement icons also freeze on the screen.
Similar to the poster above, I have had a little more success when forcing the use of GTK 2 (-Djdk.gtk.version=2
). However, GTK 2 has now reached end-of-life, and with GTK 2, DockFX still has significant problems. For example, docks freeze mid-drag, though in this case, they can be "picked up" again. Also, while the positioning icons can be made to work after multiple mouse drags, on the first drag they often don't do anything and stay in position after they should have disappeared.
How does OpenJFX behave outside of DockFX on its own?
I have not seen significant general problems when using OpenJFX. These issues seem specific to DockFX.
The bug is now resolved. It was an internal problem of JavaFX for Linux and it was a blocker for any drag-and-drop window-based frameworks, not only for DockFX. It has been fixed in javafx 20.
check details:
https://bugs.openjdk.org/browse/JDK-8292922