_MUTTER_HINTS
A per-window _MUTTER_HINTS property allowing plugins to use custom hints. The property holds a colon separated list of key=value pairs; plugin-specific keys must be suitably namespaced, while 'mutter-' prefix is reserved for internal Mutter use only. This commit adds MetaWindow::mutter-hints property, and meta_window_get_mutter_hints() accessor, as well as the internal machinery for reading and updating of the hints. https://bugzilla.gnome.org/show_bug.cgi?id=613123
This commit is contained in:
@@ -146,7 +146,8 @@ enum {
|
||||
PROP_WINDOW_TYPE,
|
||||
PROP_USER_TIME,
|
||||
PROP_DEMANDS_ATTENTION,
|
||||
PROP_URGENT
|
||||
PROP_URGENT,
|
||||
PROP_MUTTER_HINTS
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -228,6 +229,9 @@ meta_window_get_property(GObject *object,
|
||||
case PROP_URGENT:
|
||||
g_value_set_boolean (value, win->wm_hints_urgent);
|
||||
break;
|
||||
case PROP_MUTTER_HINTS:
|
||||
g_value_set_string (value, win->mutter_hints);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@@ -348,6 +352,13 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
FALSE,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_MUTTER_HINTS,
|
||||
g_param_spec_string ("mutter-hints",
|
||||
"_MUTTER_HINTS",
|
||||
"Contents of the _MUTTER_HINTS property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
window_signals[WORKSPACE_CHANGED] =
|
||||
g_signal_new ("workspace-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
@@ -9120,3 +9131,29 @@ meta_window_is_modal (MetaWindow *window)
|
||||
|
||||
return window->wm_state_modal;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_mutter_hints:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Gets the current value of the _MUTTER_HINTS property.
|
||||
*
|
||||
* The purpose of the hints is to allow fine-tuning of the Window Manager and
|
||||
* Compositor behaviour on per-window basis, and is intended primarily for
|
||||
* hints that are plugin-specific.
|
||||
*
|
||||
* The property is a list of colon-separated key=value pairs. The key names for
|
||||
* any plugin-specific hints must be suitably namespaced to allow for shared
|
||||
* use; 'mutter-' key prefix is reserved for internal use, and must not be used
|
||||
* by plugins.
|
||||
*
|
||||
* Return value: (transfer none): the _MUTTER_HINTS string, or %NULL if no hints
|
||||
* are set.
|
||||
*/
|
||||
const char *
|
||||
meta_window_get_mutter_hints (MetaWindow *window)
|
||||
{
|
||||
g_return_val_if_fail (META_IS_WINDOW (window), NULL);
|
||||
|
||||
return window->mutter_hints;
|
||||
}
|
||||
|
Reference in New Issue
Block a user