From 4257b8deff9f55063195ad7c9272398a944927ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 31 May 2011 19:52:04 +0200 Subject: [PATCH] window: Expose minimized state as property Track the minimized state in a property, so that we can receive change notifications. https://bugzilla.gnome.org/show_bug.cgi?id=651568 --- src/core/window.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index 97cbb7367..d2deb53c1 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -150,6 +150,7 @@ enum { PROP_FULLSCREEN, PROP_MAXIMIZED_HORIZONTALLY, PROP_MAXIMIZED_VERTICALLY, + PROP_MINIMIZED, PROP_WINDOW_TYPE, PROP_USER_TIME, PROP_DEMANDS_ATTENTION, @@ -230,6 +231,9 @@ meta_window_get_property(GObject *object, case PROP_MAXIMIZED_VERTICALLY: g_value_set_boolean (value, win->maximized_vertically); break; + case PROP_MINIMIZED: + g_value_set_boolean (value, win->minimized); + break; case PROP_WINDOW_TYPE: g_value_set_enum (value, win->type); break; @@ -335,6 +339,13 @@ meta_window_class_init (MetaWindowClass *klass) "Whether window is maximized vertically", FALSE, G_PARAM_READABLE)); + g_object_class_install_property (object_class, + PROP_MINIMIZED, + g_param_spec_boolean ("minimized", + "Minimizing", + "Whether window is minimized", + FALSE, + G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_WINDOW_TYPE, @@ -3147,6 +3158,7 @@ meta_window_minimize (MetaWindow *window) "Minimizing window %s which doesn't have the focus\n", window->desc); } + g_object_notify (G_OBJECT (window), "minimized"); } } @@ -3164,6 +3176,7 @@ meta_window_unminimize (MetaWindow *window) meta_window_foreach_transient (window, queue_calc_showing_func, NULL); + g_object_notify (G_OBJECT (window), "minimized"); } }