summary refs log tree commit diff stats
path: root/src/fe-gtk/maingui.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/maingui.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/maingui.c')
-rw-r--r--src/fe-gtk/maingui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index e5f79abd..ff8f6d69 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -498,10 +498,6 @@ fe_set_title (session *sess)
 static gboolean
 mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata)
 {
-	prefs.hex_gui_win_state = 0;
-	if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
-		prefs.hex_gui_win_state = 1;
-
 	if ((event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
 		 (event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
 		 prefs.hex_gui_tray_minimize && !hextray_mode ())
@@ -510,6 +506,10 @@ mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata
 		gtk_window_deiconify (wid);
 	}
 
+	prefs.hex_gui_win_state = 0;
+	if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
+		prefs.hex_gui_win_state = 1;
+
 	return FALSE;
 }