From fb8c5c237809604a6f6bcf09bfd7670aeb0e5061 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 26 Sep 2016 02:43:10 +0200 Subject: [PATCH] Fixed JavaFX issues with gnome-shell --- src/dorkbox/systemTray/linux/GtkSystemTray.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/systemTray/linux/GtkSystemTray.java b/src/dorkbox/systemTray/linux/GtkSystemTray.java index b86c2ab..369a5dc 100644 --- a/src/dorkbox/systemTray/linux/GtkSystemTray.java +++ b/src/dorkbox/systemTray/linux/GtkSystemTray.java @@ -100,7 +100,14 @@ class GtkSystemTray extends GtkTypeSystemTray { // can cause // Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed // Gdk-CRITICAL **: IA__gdk_window_thaw_toplevel_updates_libgtk_only: assertion 'private->update_and_descendants_freeze_count > 0' failed - // Gtk.gtk_status_icon_set_name(trayIcon, "SystemTray"); + + // ... so, bizzaro things going on here. These errors DO NOT happen if JavaFX is dispatching the events. + // BUT this is REQUIRED when running JavaFX. For unknown reasons, the title isn't pushed to GTK, so our + // gnome-shell extension cannot see our tray icon -- so naturally, it won't move it to the "top" area and + // we appear broken. + if (SystemTray.isJavaFxLoaded) { + Gtk.gtk_status_icon_set_name(trayIcon, "SystemTray"); + } } }); }