[mutter] window: Expose minimized state as property
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Expose minimized state as property
- Date: Tue, 31 May 2011 19:21:06 +0000 (UTC)
commit 4257b8deff9f55063195ad7c9272398a944927ce
Author: Florian Müllner <fmuellner gnome org>
Date: Tue May 31 19:52:04 2011 +0200
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 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 97cbb73..d2deb53 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");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]