Set the mapped flag on the stage in the SDL and eglnative backends
authorNeil Roberts <neil@linux.intel.com>
Mon, 9 Mar 2009 18:40:58 +0000 (18:40 +0000)
committerNeil Roberts <neil@linux.intel.com>
Mon, 9 Mar 2009 18:53:31 +0000 (18:53 +0000)
Bug 1493 - GL ES does not work since Jan 9 in PowerVR SGX 535, Intel

The mapped flag needs to be set on the stage otherwise
clutter_actor_queue_redraw will never queue a redraw and never draw
anything.

In these two backends there is not really a way to hide the stage so
they both set the mapped flag immediatly when clutter_actor_show is
called.

clutter/eglnative/clutter-stage-egl.c
clutter/sdl/clutter-stage-sdl.c

index a767d55..e21778b 100644 (file)
@@ -30,12 +30,16 @@ static void
 clutter_stage_egl_show (ClutterActor *actor)
 {
   CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_MAPPED);
+  CLUTTER_ACTOR_SET_FLAGS (CLUTTER_STAGE_EGL (actor)->wrapper,
+                           CLUTTER_ACTOR_MAPPED);
 }
 
 static void
 clutter_stage_egl_hide (ClutterActor *actor)
 {
   CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_MAPPED);
+  CLUTTER_ACTOR_UNSET_FLAGS (CLUTTER_STAGE_EGL (actor)->wrapper,
+                             CLUTTER_ACTOR_MAPPED);
 }
 
 static void
index 65f7eed..17a8bd0 100644 (file)
@@ -30,6 +30,8 @@ static void
 clutter_stage_sdl_show (ClutterActor *actor)
 {
   CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_MAPPED);
+  CLUTTER_ACTOR_SET_FLAGS (CLUTTER_STAGE_SDL (actor)->wrapper,
+                           CLUTTER_ACTOR_MAPPED);
 
   CLUTTER_ACTOR_CLASS (clutter_stage_sdl_parent_class)->show (actor);
 }
@@ -39,6 +41,8 @@ clutter_stage_sdl_hide (ClutterActor *actor)
 {
   /* No way to easily unmap SDL window ? */
   CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_MAPPED);
+  CLUTTER_ACTOR_UNSET_FLAGS (CLUTTER_STAGE_SDL (actor)->wrapper,
+                             CLUTTER_ACTOR_MAPPED);
 
   CLUTTER_ACTOR_CLASS (clutter_stage_sdl_parent_class)->hide (actor);
 }