8215364: JavaFX crashes on Ubuntu 18.04 with Wayland while using Swing-FX interop
authorpbansal
Fri, 21 Dec 2018 11:43:04 +0530
changeset 53112 6e8c8d16ecb4
parent 53091 5bf5b773fc41
child 53113 a92cd6585f60
8215364: JavaFX crashes on Ubuntu 18.04 with Wayland while using Swing-FX interop Reviewed-by: prr, kcr
src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c
--- a/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Thu Dec 20 19:44:08 2018 +0100
+++ b/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c	Fri Dec 21 11:43:04 2018 +0530
@@ -150,6 +150,10 @@
 DEF_JNI_OnLoad(JavaVM *vm, void *reserved)
 {
     jvm = vm;
+
+    //Set the gtk backend to x11 on all the systems
+    putenv("GDK_BACKEND=x11");
+
     return JNI_VERSION_1_2;
 }