diff options
-rw-r--r-- | src/window.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index 9088d59..f516427 100644 --- a/src/window.c +++ b/src/window.c @@ -28,6 +28,15 @@ #include "tab.h" static void +is_maximized_cb(GtkWindow *window, + GParamSpec __attribute__((unused)) *paramspec, MqConfig *config) +{ + mq_config_set_boolean(config, "window.maximized", + gtk_window_is_maximized(window)); + mq_config_save(config); +} + +static void destroy_cb(GtkWidget __attribute__((unused)) *widget, MqWindow *window) { mq_application_delete_window(window->application, window); @@ -87,6 +96,8 @@ mq_window_new(MqApplication *application, const gchar **uris) mq_config_get_integer(config, "window.width"), mq_config_get_integer(config, "window.height")); } + g_signal_connect(window->window, "notify::is-maximized", + G_CALLBACK(is_maximized_cb), config); g_signal_connect(window->window, "destroy", G_CALLBACK(destroy_cb), window); |