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
This commit is contained in:
parent
e21e2c892a
commit
4257b8deff
@ -150,6 +150,7 @@ enum {
|
|||||||
PROP_FULLSCREEN,
|
PROP_FULLSCREEN,
|
||||||
PROP_MAXIMIZED_HORIZONTALLY,
|
PROP_MAXIMIZED_HORIZONTALLY,
|
||||||
PROP_MAXIMIZED_VERTICALLY,
|
PROP_MAXIMIZED_VERTICALLY,
|
||||||
|
PROP_MINIMIZED,
|
||||||
PROP_WINDOW_TYPE,
|
PROP_WINDOW_TYPE,
|
||||||
PROP_USER_TIME,
|
PROP_USER_TIME,
|
||||||
PROP_DEMANDS_ATTENTION,
|
PROP_DEMANDS_ATTENTION,
|
||||||
@ -230,6 +231,9 @@ meta_window_get_property(GObject *object,
|
|||||||
case PROP_MAXIMIZED_VERTICALLY:
|
case PROP_MAXIMIZED_VERTICALLY:
|
||||||
g_value_set_boolean (value, win->maximized_vertically);
|
g_value_set_boolean (value, win->maximized_vertically);
|
||||||
break;
|
break;
|
||||||
|
case PROP_MINIMIZED:
|
||||||
|
g_value_set_boolean (value, win->minimized);
|
||||||
|
break;
|
||||||
case PROP_WINDOW_TYPE:
|
case PROP_WINDOW_TYPE:
|
||||||
g_value_set_enum (value, win->type);
|
g_value_set_enum (value, win->type);
|
||||||
break;
|
break;
|
||||||
@ -335,6 +339,13 @@ meta_window_class_init (MetaWindowClass *klass)
|
|||||||
"Whether window is maximized vertically",
|
"Whether window is maximized vertically",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
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,
|
g_object_class_install_property (object_class,
|
||||||
PROP_WINDOW_TYPE,
|
PROP_WINDOW_TYPE,
|
||||||
@ -3147,6 +3158,7 @@ meta_window_minimize (MetaWindow *window)
|
|||||||
"Minimizing window %s which doesn't have the focus\n",
|
"Minimizing window %s which doesn't have the focus\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
}
|
}
|
||||||
|
g_object_notify (G_OBJECT (window), "minimized");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3164,6 +3176,7 @@ meta_window_unminimize (MetaWindow *window)
|
|||||||
meta_window_foreach_transient (window,
|
meta_window_foreach_transient (window,
|
||||||
queue_calc_showing_func,
|
queue_calc_showing_func,
|
||||||
NULL);
|
NULL);
|
||||||
|
g_object_notify (G_OBJECT (window), "minimized");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user