From 3858228d25206be6da1c40ae2eaf6547d83f9477 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 06 Oct 2017 20:12:17 -0400 Subject: MqWindow: Set window.maximized on maximize or unmaximize --- 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); -- cgit v0.9.1