From dbc8b3468b95bc7ff891a21c48a8246ad83ae0d7 Mon Sep 17 00:00:00 2001 From: githpr Date: Thu, 13 Jul 2017 15:09:06 +0200 Subject: [PATCH] Use correct value to save the window state in gsettings. (#147) * Use correct value to save the window state in gsettings. This ensures that the window will be maximized if it was closed in this state. * Use correct value in xed_window_configure_event function --- xed/xed-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xed/xed-window.c b/xed/xed-window.c index f034760..4adb551 100644 --- a/xed/xed-window.c +++ b/xed/xed-window.c @@ -256,7 +256,7 @@ xed_window_window_state_event (GtkWidget *widget, XedWindow *window = XED_WINDOW (widget); window->priv->window_state = event->new_window_state; - g_settings_set_int (window->priv->window_settings, XED_SETTINGS_WINDOW_STATE, window->priv->state); + g_settings_set_int (window->priv->window_settings, XED_SETTINGS_WINDOW_STATE, window->priv->window_state); return FALSE; } @@ -268,7 +268,7 @@ xed_window_configure_event (GtkWidget *widget, XedWindow *window = XED_WINDOW (widget); if (gtk_widget_get_realized (widget) && - (window->priv->state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0) + (window->priv->window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) == 0) { save_window_state (widget); }