openjdk-jfx
openjdk-jfx copied to clipboard
Showing modal dialog stops main window from being resizable even after modal dialog is closed.
Linux, JDK 11, using openjfx libs from maven (11.0.2)
To reproduce, create a javafx stage containing a button that shows a dialog with initModality(Application_modal) when pressed.
Test resizing before and after the dialog is shown.
Have seen the same problem on a Windows PC as well.
If you mean that you can't resize the window while the modal dialog is showing, then that's the expected behavior. If you mean that you still can't resize the window after the modal dialog is closed, then that would be a bug. I tried a quick test and it is working as expected. If you believe you have discovered a bug, then please provide a complete, standalone test program along with instructions to reproduce it.
If you mean that you can't resize the window while the modal dialog is showing, then that's the expected behavior. If you mean that you still can't resize the window after the modal dialog is closed, then that would be a bug. I tried a quick test and it is working as expected. If you believe you have discovered a bug, then please provide a complete, standalone test program along with instructions to reproduce it.
The main window is not resizable anymore after the modal dialog is closed, although doing hide(); setResizable(true); show() makes it work as expected again. This workaround isn't sufficient though, since the user will see the window being hidden for a brief moment. setResizable(true) alone is not sufficient.
Will reopen the issue once I have provided an example.
OK, thanks. We have fixed similar problems in the past, e.g., https://bugs.openjdk.java.net/browse/JDK-8152421
Here's an example project.
I suspect that the bug is in the quantum or glass toolkit, since changing the version of JavaFX doesn't seem to do anything.
How can I check which version of the glass toolkit I have installed?
Glass is an integral part of JavaFX, not a separate entity.
I'll try your test program in the next day or so and see if that reproduces the problem on my machine. If not, then it might be timing related or else something specific to your system (e.g., Linux distro, version of libraries, etc). Is this with GTK2 or GTK3? You can check by running with -Djdk.gtk.verbose=true and you can force with -Djdk.gtk.version=2 or -Djdk.gtk.version=3.
Here's what I get depending on the gtk version I use.
checking GTK version 3
trying GTK library libgtk-3.so.0
using GTK library version 3 set libgtk-3.so.0
Glass GTK library to load is glassgtk3
checking GTK version 2
trying GTK library libgtk-x11-2.0.so.0
using GTK library version 2 set libgtk-x11-2.0.so.0
Glass GTK library to load is glassgtk2
In both cases, the same resizing bug is present.
I'm running ubuntu 18.04 LTS.
Reading state information... Done openjfx is already the newest version (11.0.2+1-1~18.04.2).