summary refs log tree commit diff stats
path: root/src/fe-gtk/maingui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-gtk/maingui.c')
-rw-r--r--src/fe-gtk/maingui.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 20edf1ba..145f4096 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -51,6 +51,7 @@
 #include "plugin-tray.h"
 #include "xtext.h"
 #include "sexy-spell-entry.h"
+#include "gtkutil.h"
 
 #define GUI_SPACING (3)
 #define GUI_BORDER (0)
@@ -430,7 +431,7 @@ mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata
 	if ((event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
 		 (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
 		 prefs.hex_gui_tray_minimize && prefs.hex_gui_tray &&
-		 !unity_mode ())
+		 gtkutil_tray_icon_supported (wid))
 	{
 		tray_toggle_visibility (TRUE);
 		gtk_window_deiconify (wid);
@@ -1215,7 +1216,7 @@ mg_open_quit_dialog (gboolean minimize_button)
 	gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1),
 										GTK_BUTTONBOX_END);
 
-	if (minimize_button && !unity_mode ())
+	if (minimize_button && gtkutil_tray_icon_supported (GTK_WINDOW(dialog)))
 	{
 		button = gtk_button_new_with_mnemonic (_("_Minimize to Tray"));
 		gtk_widget_show (button);
@@ -3176,8 +3177,9 @@ mg_tabwindow_de_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
 {
 	GSList *list;
 	session *sess;
+	GtkWindow *win = GTK_WINDOW(gtk_widget_get_toplevel (widget));
 
-	if (prefs.hex_gui_tray_close && !unity_mode () && tray_toggle_visibility (FALSE))
+	if (prefs.hex_gui_tray_close && gtkutil_tray_icon_supported (win) && tray_toggle_visibility (FALSE))
 		return TRUE;
 
 	/* check for remaining toplevel windows */