mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
script: Do not use clutter_stage_get_default()
It's about to go away, so we should use the StageManager API instead.
This commit is contained in:
parent
b1ccd262b1
commit
2288d708e2
@ -43,6 +43,8 @@
|
||||
#include "clutter-script-private.h"
|
||||
#include "clutter-scriptable.h"
|
||||
|
||||
#include "clutter-stage-manager.h"
|
||||
|
||||
#include "clutter-private.h"
|
||||
|
||||
static void clutter_script_parser_object_end (JsonParser *parser,
|
||||
@ -1966,7 +1968,9 @@ _clutter_script_construct_object (ClutterScript *script,
|
||||
|
||||
if (oinfo->is_stage && oinfo->is_stage_default)
|
||||
{
|
||||
ClutterStageManager *manager = clutter_stage_manager_get_default ();
|
||||
GList *properties = oinfo->properties;
|
||||
ClutterStage *default_stage;
|
||||
|
||||
/* the default stage is a complex beast: we cannot create it using
|
||||
* g_object_newv() but we need clutter_script_construct_parameters()
|
||||
@ -1981,7 +1985,8 @@ _clutter_script_construct_object (ClutterScript *script,
|
||||
properties,
|
||||
¶ms);
|
||||
|
||||
oinfo->object = G_OBJECT (clutter_stage_get_default ());
|
||||
default_stage = clutter_stage_manager_get_default_stage (manager);
|
||||
oinfo->object = G_OBJECT (default_stage);
|
||||
|
||||
for (i = 0; i < params->len; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user