diff options
author | Neil Roberts <neil@linux.intel.com> | 2011-12-21 15:13:53 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2012-02-09 16:34:25 +0000 |
commit | fee53a2993db3795bd7ffbb4e878c807ccdaa80c (patch) | |
tree | 402d077ee7f4979398a3d8a8f7e9a20d096e6df5 /clutter/clutter-backend.c | |
parent | bace07c0a02198a97f89c516849e5161e20d26c3 (diff) | |
download | clutter-fee53a2993db3795bd7ffbb4e878c807ccdaa80c.tar.gz |
clutter-backend: Use the Cogl main loop mechanism
Cogl now requires that all applications integrate their main loop with
Cogl so that it can listen for events from winsys. This patch just
adds Cogl's GSource to the main loop.
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'clutter/clutter-backend.c')
-rw-r--r-- | clutter/clutter-backend.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c index 9d14df3fa..488008f7b 100644 --- a/clutter/clutter-backend.c +++ b/clutter/clutter-backend.c @@ -142,6 +142,8 @@ clutter_backend_finalize (GObject *gobject) { ClutterBackend *backend = CLUTTER_BACKEND (gobject); + g_source_destroy (backend->cogl_source); + g_free (backend->priv->font_name); clutter_backend_set_font_options (backend, NULL); @@ -324,6 +326,10 @@ clutter_backend_real_create_context (ClutterBackend *backend, if (backend->cogl_context == NULL) goto error; + backend->cogl_source = cogl_glib_source_new (backend->cogl_context, + G_PRIORITY_DEFAULT); + g_source_attach (backend->cogl_source, NULL); + /* the display owns the renderer and the swap chain */ cogl_object_unref (backend->cogl_renderer); cogl_object_unref (swap_chain); |