diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index d0b6b0420..afd9bd363 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -474,7 +474,7 @@ _clutter_do_pick (ClutterStage *stage, { ClutterMainContext *context; guchar pixel[4] = { 0xff, 0xff, 0xff, 0xff }; - CoglColor white; + CoglColor stage_pick_id; guint32 id; GLboolean dither_was_on; @@ -491,9 +491,9 @@ _clutter_do_pick (ClutterStage *stage, if (G_LIKELY (!(clutter_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS))) cogl_clip_push_window_rectangle (x, y, 1, 1); - cogl_color_set_from_4ub (&white, 255, 255, 255, 255); cogl_disable_fog (); - cogl_clear (&white, + cogl_color_set_from_4ub (&stage_pick_id, 0, 0, 0, 255); + cogl_clear (&stage_pick_id, COGL_BUFFER_BIT_COLOR | COGL_BUFFER_BIT_DEPTH); diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 305733878..760bec193 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -67,6 +67,7 @@ #include "clutter-stage-window.h" #include "clutter-version.h" /* For flavour */ #include "clutter-id-pool.h" +#include "clutter-container.h" #include "cogl/cogl.h" @@ -282,12 +283,13 @@ static void clutter_stage_pick (ClutterActor *self, const ClutterColor *color) { - /* Paint nothing, cogl_paint_init() effectively paints the stage - * silhouette for us - see _clutter_do_pick(). - * Chain up to the groups paint howerer so our children get picked - * - clutter_group_pick + /* Note: we don't chain up to our parent as we don't want any geometry + * emitted for the stage itself. The stage's pick id is effectively handled + * by the call to cogl_clear done in clutter-main.c:_clutter_do_pick_async() */ - CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->pick (self, color); + + clutter_container_foreach (CLUTTER_CONTAINER (self), + CLUTTER_CALLBACK (clutter_actor_paint), NULL); } static void