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
This commit is contained in:
parent
b0e72aafa6
commit
dbc8b3468b
|
@ -256,7 +256,7 @@ xed_window_window_state_event (GtkWidget *widget,
|
||||||
XedWindow *window = XED_WINDOW (widget);
|
XedWindow *window = XED_WINDOW (widget);
|
||||||
|
|
||||||
window->priv->window_state = event->new_window_state;
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ xed_window_configure_event (GtkWidget *widget,
|
||||||
XedWindow *window = XED_WINDOW (widget);
|
XedWindow *window = XED_WINDOW (widget);
|
||||||
|
|
||||||
if (gtk_widget_get_realized (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);
|
save_window_state (widget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue