[metacity] window: add shaded property
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] window: add shaded property
- Date: Tue, 1 Oct 2019 18:46:04 +0000 (UTC)
commit 5d5f8d652ed69cdf932844aeaa03bc0ac243069c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Oct 1 15:23:48 2019 +0300
window: add shaded property
Add shaded property to allow compositor listen for change
notifications.
src/core/window.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index 695f7c3b..efe58755 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -137,6 +137,7 @@ enum
PROP_APPEARS_FOCUSED,
PROP_DECORATED,
+ PROP_SHADED,
LAST_PROP
};
@@ -3098,6 +3099,8 @@ meta_window_shade (MetaWindow *window,
meta_window_focus (window, timestamp);
set_net_wm_state (window);
+
+ g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_SHADED]);
}
}
@@ -3123,6 +3126,8 @@ meta_window_unshade (MetaWindow *window,
meta_window_focus (window, timestamp);
set_net_wm_state (window);
+
+ g_object_notify_by_pspec (G_OBJECT (window), properties[PROP_SHADED]);
}
}
@@ -9294,6 +9299,10 @@ meta_window_get_property (GObject *object,
g_value_set_boolean (value, window->decorated);
break;
+ case PROP_SHADED:
+ g_value_set_boolean (value, window->shaded);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -9311,6 +9320,10 @@ install_properties (GObjectClass *object_class)
g_param_spec_boolean ("decorated", "decorated", "decorated",
TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ properties[PROP_SHADED] =
+ g_param_spec_boolean ("shaded", "shaded", "shaded",
+ FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
g_object_class_install_properties (object_class, LAST_PROP, properties);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]