From 48a2cca476d910f1b1732a3960866da6d932e3e3 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 19 Nov 2008 22:54:42 +0000 Subject: [PATCH] Add a 'screen' property to ShellGlobal Add a screen property to ShellGlobal so Javascript code can get access to the MetaScreen. http://bugzilla.gnome.org/show_bug.cgi?id=561297 svn path=/trunk/; revision=61 --- src/shell-global.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/shell-global.c b/src/shell-global.c index 1a186bafe..4652e92fe 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -15,6 +15,7 @@ enum { PROP_0, PROP_OVERLAY_GROUP, + PROP_SCREEN, PROP_SCREEN_WIDTH, PROP_SCREEN_HEIGHT, PROP_STAGE, @@ -60,6 +61,9 @@ shell_global_get_property(GObject *object, case PROP_OVERLAY_GROUP: g_value_set_object (value, mutter_plugin_get_overlay_group (global->plugin)); break; + case PROP_SCREEN: + g_value_set_object (value, mutter_plugin_get_screen (global->plugin)); + break; case PROP_SCREEN_WIDTH: { int width, height; @@ -126,6 +130,13 @@ shell_global_class_init (ShellGlobalClass *klass) "Actor holding objects that appear above the desktop contents", CLUTTER_TYPE_ACTOR, G_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_SCREEN, + g_param_spec_object ("screen", + "Screen", + "Metacity screen object for the shell", + META_TYPE_SCREEN, + G_PARAM_READABLE)); g_object_class_install_property (gobject_class, PROP_SCREEN_WIDTH, g_param_spec_int ("screen-width",