mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter/stage-view: Pass a pointer to the stage during constuction
This is so that stage views can interact with the stage they are views of. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
parent
ca82cde6dd
commit
59eebd6f6d
@ -33,6 +33,7 @@ enum
|
||||
PROP_0,
|
||||
|
||||
PROP_NAME,
|
||||
PROP_STAGE,
|
||||
PROP_LAYOUT,
|
||||
PROP_FRAMEBUFFER,
|
||||
PROP_OFFSCREEN,
|
||||
@ -48,6 +49,8 @@ typedef struct _ClutterStageViewPrivate
|
||||
{
|
||||
char *name;
|
||||
|
||||
ClutterStage *stage;
|
||||
|
||||
cairo_rectangle_int_t layout;
|
||||
float scale;
|
||||
CoglFramebuffer *framebuffer;
|
||||
@ -1003,6 +1006,9 @@ clutter_stage_view_get_property (GObject *object,
|
||||
case PROP_NAME:
|
||||
g_value_set_string (value, priv->name);
|
||||
break;
|
||||
case PROP_STAGE:
|
||||
g_value_set_boxed (value, &priv->stage);
|
||||
break;
|
||||
case PROP_LAYOUT:
|
||||
g_value_set_boxed (value, &priv->layout);
|
||||
break;
|
||||
@ -1039,6 +1045,9 @@ clutter_stage_view_set_property (GObject *object,
|
||||
case PROP_NAME:
|
||||
priv->name = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_STAGE:
|
||||
priv->stage = g_value_get_object (value);
|
||||
break;
|
||||
case PROP_LAYOUT:
|
||||
layout = g_value_get_boxed (value);
|
||||
priv->layout = *layout;
|
||||
@ -1146,6 +1155,16 @@ clutter_stage_view_class_init (ClutterStageViewClass *klass)
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_props[PROP_STAGE] =
|
||||
g_param_spec_object ("stage",
|
||||
"The stage",
|
||||
"The ClutterStage",
|
||||
CLUTTER_TYPE_STAGE,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
|
||||
obj_props[PROP_LAYOUT] =
|
||||
g_param_spec_boxed ("layout",
|
||||
"View layout",
|
||||
|
@ -3247,6 +3247,7 @@ meta_renderer_native_create_view (MetaRenderer *renderer,
|
||||
&view_layout);
|
||||
view = g_object_new (META_TYPE_RENDERER_VIEW,
|
||||
"name", meta_output_get_name (output),
|
||||
"stage", meta_backend_get_stage (backend),
|
||||
"layout", &view_layout,
|
||||
"scale", scale,
|
||||
"framebuffer", onscreen,
|
||||
|
@ -164,6 +164,7 @@ meta_renderer_x11_nested_ensure_legacy_view (MetaRendererX11Nested *renderer_x11
|
||||
};
|
||||
legacy_view = g_object_new (META_TYPE_RENDERER_VIEW,
|
||||
"name", "legacy nested",
|
||||
"stage", meta_backend_get_stage (backend),
|
||||
"layout", &view_layout,
|
||||
"framebuffer", COGL_FRAMEBUFFER (fake_onscreen),
|
||||
NULL);
|
||||
@ -216,6 +217,7 @@ meta_renderer_x11_nested_create_view (MetaRenderer *renderer,
|
||||
|
||||
view = g_object_new (META_TYPE_RENDERER_VIEW,
|
||||
"name", meta_output_get_name (output),
|
||||
"stage", meta_backend_get_stage (backend),
|
||||
"layout", &view_layout,
|
||||
"framebuffer", COGL_FRAMEBUFFER (fake_onscreen),
|
||||
"offscreen", COGL_FRAMEBUFFER (offscreen),
|
||||
|
Loading…
Reference in New Issue
Block a user