gluonhq / scenebuilder

Scene Builder is a visual, drag 'n' drop, layout tool for designing JavaFX application user interfaces.
https://gluonhq.com/products/scene-builder/
Other
725 stars 218 forks source link

Broken dialogs when using a tiling window manager #182

Closed cilki closed 5 years ago

cilki commented 6 years ago

Some dialogs in Scene Builder 9.0.1 open as tiny white boxes under a tiling window manager (I'm using dwm). I tested Scene Builder 8.4.1 and all dialogs open as expected.

2018-05-31-100328_847x335_scrot

This issue occurs for File->Preferences, Help->Check For Update, and some other dialogs (Help->About works though). The open/save dialogs also seem to work since they are GTK.

I'm on Arch Linux 4.16.11-1 x86_64 and Scene Builder installed from here.

moacirrf commented 6 years ago

I think that i resolved this issue, on my Fork, i dont know if it is the best solution. https://github.com/moacirrf/scenebuilder/tree/integration-9 Check for updates https://github.com/moacirrf/scenebuilder/commit/2cb730f102ffe1e352f0b509b68ecc4e1b2bfac7 Preferences Window https://github.com/moacirrf/scenebuilder/commit/1fdd27211aeb7a1ce4dd066da8a81ab2fd1eb443

cilki commented 6 years ago

@moacirrf I just got around to testing this.

I can confirm your commit fixes the preferences window and check for update, but I discovered two more dialogs where the error occurs:

Thanks for your help!

moacirrf commented 6 years ago

Thanks! I will correct this too, i wonder if it is a SceneBuilder or a Jfx runtime problem, but call Stage.sizeToScene() in a separate thread works well.

Platform.runLater(() -> getStage().sizeToScene()); Quite frankly i dont know if it is a good practice.

moacirrf commented 6 years ago

I think i Fixed this issue too, sorry for late. https://github.com/gluonhq/scenebuilder/commit/219e61e176be8b14ddc181bc80c1298573f8f3ab https://github.com/gluonhq/scenebuilder/commit/9f1a4589db76b468c723ed838d55e4bf1be9eea2

moacirrf commented 5 years ago

This bug apparently was fixed on scene builder 11? or in runtime 11. Someone can confirm? Because i cant reproduce it anymore.

cilki commented 5 years ago

@moacirrf I'll test out the latest commit when I get a chance.

moacirrf commented 5 years ago

I tried run Scene builder 10 with Runtime 11, and the dialogs broke. But Scene Builder 11 with runtime 11 no problems. I published Scene Builder 11 on Aur https://aur.archlinux.org/packages/javafx11-scenebuilder/

This is a package released by Gluon, with no changes.

cilki commented 5 years ago

This is what I get on 4.19.8-arch1-1-ARCH.

hs_err_pid4318.log

cilki commented 5 years ago

I just remembered that I recently updated my nvidia driver and that was the reason for the crash.

Unfortunately I'm still having the dialog issue with that package.

moacirrf commented 5 years ago

Hi, I did some changes on native Gtk libs, can someone test if it correct this bug, please? 1- Download my compiled libs and extract in somewhere. CompiledLib.zip 2- Go to /opt/SceneBuilder-11/runtime/lib/, or in your SceneBuilder directory. 3- Make a security copy of the files: libglass.so, libglassgtk2.so, libglassgtk3.so. 4- Copy the downloaded files to /opt/SceneBuilder-11/runtime/lib 5- Execute SceneBuilder

Obs.: Open SceneBuilder.cfg, change gtk version to 3 or 2, so we can ensure that is working on both versions. ... [JVMOptions] -Djdk.gtk.version=2 ...

Thanks

moacirrf commented 5 years ago

Im very happy that you are using my AUR package of Scene Builder. Thanks

moacirrf commented 5 years ago

If you are curious about the changes you can checkout here: https://github.com/moacirrf/openjdk-jfx/commit/cdc93af49cc85ae7bf86e1601243734bfcb73ffd

abhinayagarwal commented 5 years ago

Can you guys reproduce this bug when running from source using ./gradlew run?

The reason I ask this is because the run task force usage of GTK-2. In case this is a GTK-3 issue, we can add a JVM argument to the linux script to use GTK-2 by default.

moacirrf commented 5 years ago

Yes, this is a problem of Gtk with kde.

moacirrf commented 5 years ago

Its the same issue reported here. https://github.com/javafxports/openjdk-jfx/issues/222

abhinayagarwal commented 5 years ago

If this is a platform specific bug, I would rather close this issue linking to the OpenJFX issue. Let me know if you guys are ok with it?

cilki commented 5 years ago

@abhinayagarwal No problem, I didn't realize there was an OpenJFX issue for this one.