diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-06 20:12:17 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-06 20:12:17 (EDT) |
commit | 3858228d25206be6da1c40ae2eaf6547d83f9477 (patch) | |
tree | 1ee263c64faecd264fbe51bb2fad7f0a1905b2f5 | |
parent | d055e03b3278d4db128ec9cec1b196786880df99 (diff) | |
download | marquee-3858228d25206be6da1c40ae2eaf6547d83f9477.zip marquee-3858228d25206be6da1c40ae2eaf6547d83f9477.tar.gz marquee-3858228d25206be6da1c40ae2eaf6547d83f9477.tar.bz2 |
MqWindow: Set window.maximized on maximize or unmaximize
-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); |