openjdk-jfx icon indicating copy to clipboard operation
openjdk-jfx copied to clipboard

Showing modal dialog stops main window from being resizable even after modal dialog is closed.

Open ghost opened this issue 6 years ago • 6 comments
trafficstars

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.

ghost avatar Jul 06 '19 18:07 ghost

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.

kevinrushforth avatar Jul 19 '19 20:07 kevinrushforth

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.

user00e00 avatar Jul 20 '19 14:07 user00e00

OK, thanks. We have fixed similar problems in the past, e.g., https://bugs.openjdk.java.net/browse/JDK-8152421

kevinrushforth avatar Jul 20 '19 16:07 kevinrushforth

Here's an example project.

resizingbug.zip

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?

user00e00 avatar Jul 23 '19 09:07 user00e00

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.

kevinrushforth avatar Jul 23 '19 11:07 kevinrushforth

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).

user00e00 avatar Jul 23 '19 16:07 user00e00