stage-impl: Move properties from the stage window here

The stage window is an interface, that added properties, that were only
then actually managed by MetaStageImpl. Shuffle things slightly, and let
the MetaStageImpl object deal with these things itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>
This commit is contained in:
Jonas Ådahl 2021-09-17 17:31:03 +02:00
parent ed112fe0c6
commit c0fb52cfe6
2 changed files with 22 additions and 22 deletions

View File

@ -20,25 +20,6 @@ G_DEFINE_INTERFACE (ClutterStageWindow, clutter_stage_window, G_TYPE_OBJECT);
static void
clutter_stage_window_default_init (ClutterStageWindowInterface *iface)
{
GParamSpec *pspec;
pspec = g_param_spec_object ("backend",
"Backend",
"Back pointer to the Backend instance",
CLUTTER_TYPE_BACKEND,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_interface_install_property (iface, pspec);
pspec = g_param_spec_object ("wrapper",
"Wrapper",
"Back pointer to the Stage actor",
CLUTTER_TYPE_STAGE,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_interface_install_property (iface, pspec);
}
/**

View File

@ -57,11 +57,15 @@ G_DEFINE_TYPE_WITH_CODE (MetaStageImpl,
enum
{
PROP_0,
PROP_WRAPPER,
PROP_BACKEND,
PROP_LAST
N_PROPS
};
static GParamSpec *obj_props[N_PROPS];
static void
meta_stage_impl_unrealize (ClutterStageWindow *stage_window)
{
@ -790,8 +794,23 @@ meta_stage_impl_class_init (MetaStageImplClass *klass)
gobject_class->set_property = meta_stage_impl_set_property;
g_object_class_override_property (gobject_class, PROP_WRAPPER, "wrapper");
g_object_class_override_property (gobject_class, PROP_BACKEND, "backend");
obj_props[PROP_WRAPPER] =
g_param_spec_object ("wrapper",
"Wrapper",
"Back pointer to the Stage actor",
CLUTTER_TYPE_STAGE,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
obj_props[PROP_BACKEND] =
g_param_spec_object ("backend",
"ClutterBackend",
"ClutterBackend",
CLUTTER_TYPE_BACKEND,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, N_PROPS, obj_props);
}
static void