2008-05-13 Emmanuele Bassi <ebassi@openedhand.com>
authorEmmanuele Bassi <ebassi@openedhand.com>
Tue, 13 May 2008 10:37:17 +0000 (10:37 +0000)
committerEmmanuele Bassi <ebassi@openedhand.com>
Tue, 13 May 2008 10:37:17 +0000 (10:37 +0000)
* clutter/clutter-backend.c:
(_clutter_backend_create_stage): Call _clutter_stage_set_window()
ourselves, thus removing yet another action that backends must
implement and might get wrong; also cuts a backend-agnostic piece
of code duplication.

* clutter/eglnative/clutter-backend-egl.c:
(clutter_backend_egl_create_stage): Update the EGL native backend.

* clutter/eglx/clutter-backend-egl.c:
(clutter_backend_egl_create_stage): Update the EGLX backend.

* clutter/fruity/clutter-backend-fruity.c:
(clutter_backend_egl_create_stage): Update the fruity backend

* clutter/glx/clutter-backend-glx.c:
(clutter_backend_glx_create_stage): Update the GLX backend.

* clutter/sdl/clutter-backend-sdl.c:
(clutter_backend_sdl_create_stage): Update the SDL backend.

* HACKING.backends: Update the ::create_stage() description.

ChangeLog
HACKING.backends
clutter/clutter-backend.c
clutter/eglnative/clutter-backend-egl.c
clutter/eglx/clutter-backend-egl.c
clutter/fruity/clutter-backend-fruity.c
clutter/glx/clutter-backend-glx.c
clutter/sdl/clutter-backend-sdl.c

index e80eb63..1d0a07a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,30 @@
 2008-05-13  Emmanuele Bassi  <ebassi@openedhand.com>
 
+       * clutter/clutter-backend.c:
+       (_clutter_backend_create_stage): Call _clutter_stage_set_window()
+       ourselves, thus removing yet another action that backends must
+       implement and might get wrong; also cuts a backend-agnostic piece
+       of code duplication.
+
+       * clutter/eglnative/clutter-backend-egl.c:
+       (clutter_backend_egl_create_stage): Update the EGL native backend.
+
+       * clutter/eglx/clutter-backend-egl.c:
+       (clutter_backend_egl_create_stage): Update the EGLX backend.
+
+       * clutter/fruity/clutter-backend-fruity.c:
+       (clutter_backend_egl_create_stage): Update the fruity backend
+
+       * clutter/glx/clutter-backend-glx.c:
+       (clutter_backend_glx_create_stage): Update the GLX backend.
+
+       * clutter/sdl/clutter-backend-sdl.c:
+       (clutter_backend_sdl_create_stage): Update the SDL backend.
+
+       * HACKING.backends: Update the ::create_stage() description.
+
+2008-05-13  Emmanuele Bassi  <ebassi@openedhand.com>
+
        * clutter/x11/clutter-event-x11.c (event_translate): Remove the
        cheap Expose event compression, as it seems to play games when a
        composite manager is running. It's also not really needed, as
index 128be75..5908de1 100644 (file)
@@ -105,13 +105,8 @@ can be overridden:
   -- This function is used to create the stage implementation. It will
      receive as an argument the ClutterStage instance that is "wrapping"
      the actual implementation being created. The backend must create
-     its stage implementation and call _clutter_stage_set_window() with
-     the wrapper and the stage implementation instance:
-
-       _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (impl));
-
-     in case of error, the backend must return NULL and set the passed
-     GError.
+     its stage implementation, initialise it and then return it; in case
+     of error, the backend must return NULL and set the passed GError.
 
 Implementing the stage
 ----------------------
index bb62091..869c334 100644 (file)
@@ -163,6 +163,8 @@ _clutter_backend_create_stage (ClutterBackend  *backend,
   if (!stage)
     return NULL;
 
+  g_assert (CLUTTER_IS_STAGE_WINDOW (stage));
+  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
   _clutter_stage_manager_add_stage (context->stage_manager, wrapper);
 
   return stage;
index bc6f7b4..d5c00c1 100644 (file)
@@ -98,8 +98,6 @@ clutter_backend_egl_create_stage (ClutterBackend  *backend,
   stage_egl->backend = backend_egl;
   stage_egl->wrapper = wrapper;
 
-  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
-
   backend_egl->stage = CLUTTER_ACTOR (stage_egl);
 
   return stage;
index 6ff8741..cf44b24 100644 (file)
@@ -244,9 +244,6 @@ clutter_backend_egl_create_stage (ClutterBackend  *backend,
   stage_x11->backend = backend_x11;
   stage_x11->wrapper = wrapper;
   
-  /* set the pointer back into the wrapper */
-  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
-  
   CLUTTER_NOTE (MISC, "EGLX stage created (display:%p, screen:%d, root:%u)",
                 stage_x11->xdpy,
                 stage_x11->xscreen,
index 35be50c..b182e7e 100644 (file)
@@ -97,8 +97,6 @@ clutter_backend_egl_create_stage (ClutterBackend  *backend,
   stage_egl->backend = backend_egl;
   stage_egl->wrapper = wrapper;
 
-  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
-
   backend_egl->stage = CLUTTER_ACTOR (stage_egl);
 
   return stage;
index 66335ca..34a0da4 100644 (file)
@@ -476,9 +476,6 @@ clutter_backend_glx_create_stage (ClutterBackend  *backend,
   stage_x11->backend = backend_x11;
   stage_x11->wrapper = wrapper;
 
-  /* set the pointer back into the wrapper */
-  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
-
   CLUTTER_NOTE (BACKEND, "GLX stage created (display:%p, screen:%d, root:%u)",
                 stage_x11->xdpy,
                 stage_x11->xscreen,
index a06cd39..b81b43a 100644 (file)
@@ -93,8 +93,6 @@ clutter_backend_sdl_create_stage (ClutterBackend  *backend,
   stage_sdl = CLUTTER_STAGE_SDL (stage);
   stage_sdl->wrapper = wrapper;
 
-  _clutter_stage_set_window (wrapper, CLUTTER_STAGE_WINDOW (stage));
-
   backend_sdl->stage = stage_sdl;
 
   return stage;