summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-10-01 15:23:48 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-10-01 15:23:48 +0300
commit5d5f8d652ed69cdf932844aeaa03bc0ac243069c (patch)
tree838a434219aa184a4fc8958d2053759a02151f3a /src/core/window.c
parent569609a0af1a8c75d543cdc658d83a5c52015abc (diff)
downloadmetacity-5d5f8d652ed69cdf932844aeaa03bc0ac243069c.tar.gz
window: add shaded property
Add shaded property to allow compositor listen for change notifications.
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c13
1 files changed, 13 insertions, 0 deletions
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);
}