mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
Merge branch 'master' into msvc-support-master
This commit is contained in:
commit
8d0c68347a
@ -95,8 +95,6 @@ static gboolean clutter_clock_dispatch (GSource *source,
|
|||||||
GSourceFunc callback,
|
GSourceFunc callback,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
static ClutterMasterClock *default_clock = NULL;
|
|
||||||
|
|
||||||
static GSourceFuncs clock_funcs = {
|
static GSourceFuncs clock_funcs = {
|
||||||
clutter_clock_prepare,
|
clutter_clock_prepare,
|
||||||
clutter_clock_check,
|
clutter_clock_check,
|
||||||
@ -461,12 +459,12 @@ clutter_master_clock_init (ClutterMasterClock *self)
|
|||||||
ClutterMasterClock *
|
ClutterMasterClock *
|
||||||
_clutter_master_clock_get_default (void)
|
_clutter_master_clock_get_default (void)
|
||||||
{
|
{
|
||||||
if (G_LIKELY (default_clock != NULL))
|
ClutterMainContext *context = _clutter_context_get_default ();
|
||||||
return default_clock;
|
|
||||||
|
|
||||||
default_clock = g_object_new (CLUTTER_TYPE_MASTER_CLOCK, NULL);
|
if (G_UNLIKELY (context->master_clock == NULL))
|
||||||
|
context->master_clock = g_object_new (CLUTTER_TYPE_MASTER_CLOCK, NULL);
|
||||||
|
|
||||||
return default_clock;
|
return context->master_clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "clutter-layout-manager.h"
|
#include "clutter-layout-manager.h"
|
||||||
#include "clutter-master-clock.h"
|
#include "clutter-master-clock.h"
|
||||||
#include "clutter-settings.h"
|
#include "clutter-settings.h"
|
||||||
|
#include "clutter-stage-manager.h"
|
||||||
#include "clutter-stage.h"
|
#include "clutter-stage.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
@ -124,6 +125,12 @@ struct _ClutterMainContext
|
|||||||
/* the main windowing system backend */
|
/* the main windowing system backend */
|
||||||
ClutterBackend *backend;
|
ClutterBackend *backend;
|
||||||
|
|
||||||
|
/* the object holding all the stage instances */
|
||||||
|
ClutterStageManager *stage_manager;
|
||||||
|
|
||||||
|
/* the clock driving all the frame operations */
|
||||||
|
ClutterMasterClock *master_clock;
|
||||||
|
|
||||||
/* the main event queue */
|
/* the main event queue */
|
||||||
GQueue *events_queue;
|
GQueue *events_queue;
|
||||||
|
|
||||||
|
@ -178,12 +178,12 @@ clutter_stage_manager_init (ClutterStageManager *stage_manager)
|
|||||||
ClutterStageManager *
|
ClutterStageManager *
|
||||||
clutter_stage_manager_get_default (void)
|
clutter_stage_manager_get_default (void)
|
||||||
{
|
{
|
||||||
static ClutterStageManager *stage_manager = NULL;
|
ClutterMainContext *context = _clutter_context_get_default ();
|
||||||
|
|
||||||
if (G_UNLIKELY (stage_manager == NULL))
|
if (G_UNLIKELY (context->stage_manager == NULL))
|
||||||
stage_manager = g_object_new (CLUTTER_TYPE_STAGE_MANAGER, NULL);
|
context->stage_manager = g_object_new (CLUTTER_TYPE_STAGE_MANAGER, NULL);
|
||||||
|
|
||||||
return stage_manager;
|
return context->stage_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user