scroll-actor: Paint children in pick mode
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 15 May 2012 14:06:20 +0000 (15:06 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 15 May 2012 14:14:04 +0000 (15:14 +0100)
Chaining up to the parent's implementation of pick() is not enough: we
need to paint our children explicitly because of the compatibility mode
checks we use to avoid breaking custom containers.

https://bugzilla.gnome.org/show_bug.cgi?id=676088

clutter/clutter-scroll-actor.c

index 888dd59..c1a7b23 100644 (file)
@@ -155,10 +155,20 @@ static void
 clutter_scroll_actor_pick (ClutterActor       *actor,
                            const ClutterColor *pick_color)
 {
+  ClutterActorIter iter;
+  ClutterActor *child;
+
   clutter_scroll_actor_push_clip (actor);
 
   CLUTTER_ACTOR_CLASS (clutter_scroll_actor_parent_class)->pick (actor, pick_color);
 
+  /* FIXME - this has to go away when we remove the vfunc check inside
+   * the ClutterActor::pick default implementation
+   */
+  clutter_actor_iter_init (&iter, actor);
+  while (clutter_actor_iter_next (&iter, &child))
+    clutter_actor_paint (child);
+
   cogl_clip_pop ();
 }