summary refs log tree commit diff stats
path: root/src/fe-gtk/plugin-tray.c
diff options
context:
space:
mode:
authorRichardHitt <rbh00@netcom.com>2012-12-20 12:16:48 -0800
committerRichardHitt <rbh00@netcom.com>2012-12-20 12:16:48 -0800
commit3e85c2e820e905e64c4e01701e4fb0267661afca (patch)
tree395fefa8be9c648f6c3c4296d600ffbf1eeb78d8 /src/fe-gtk/plugin-tray.c
parenta321793e9337291289d136f98755192c2902a4cc (diff)
parent52ffb02685d922696497e17f22fd15b3dc5b3916 (diff)
Merge pull request #326 from TingPing/minimize
fix restoring previously maximized window from tray
Diffstat (limited to 'src/fe-gtk/plugin-tray.c')
-rw-r--r--src/fe-gtk/plugin-tray.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 07207a99..294920da 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -372,6 +372,7 @@ tray_toggle_visibility (gboolean force_hide)
 {
 	static int x, y;
 	static GdkScreen *screen;
+	static int maximized;
 	GtkWindow *win;
 
 	if (!sticon)
@@ -396,12 +397,15 @@ tray_toggle_visibility (gboolean force_hide)
 	{
 		gtk_window_get_position (win, &x, &y);
 		screen = gtk_window_get_screen (win);
+		maximized = prefs.hex_gui_win_state;
 		gtk_widget_hide (GTK_WIDGET (win));
 	}
 	else
 	{
 		gtk_window_set_screen (win, screen);
 		gtk_window_move (win, x, y);
+		if (maximized)
+			gtk_window_maximize (win);
 		gtk_widget_show (GTK_WIDGET (win));
 		gtk_window_present (win);
 	}