[mutter] compositor: Ensure child actors are included in picking
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] compositor: Ensure child actors are included in picking
- Date: Thu, 23 Oct 2014 14:54:43 +0000 (UTC)
commit 700d3679372e9287952b3eea30727d015c745849
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Oct 20 18:44:55 2014 +0200
compositor: Ensure child actors are included in picking
If the actor surface has an input mask, custom picking is implemented
for the portions affected by the mask, although the child actors (most
usually subsurfaces) are left out.
https://bugzilla.gnome.org/show_bug.cgi?id=738890
src/compositor/meta-surface-actor.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index bb85478..b51a5a7 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -65,6 +65,8 @@ meta_surface_actor_pick (ClutterActor *actor,
CoglContext *ctx;
CoglFramebuffer *fb;
CoglColor cogl_color;
+ ClutterActorIter iter;
+ ClutterActor *child;
n_rects = cairo_region_num_rectangles (priv->input_region);
rectangles = g_alloca (sizeof (float) * 4 * n_rects);
@@ -91,6 +93,11 @@ meta_surface_actor_pick (ClutterActor *actor,
cogl_pipeline_set_color (pipeline, &cogl_color);
cogl_framebuffer_draw_rectangles (fb, pipeline, rectangles, n_rects);
cogl_object_unref (pipeline);
+
+ clutter_actor_iter_init (&iter, actor);
+
+ while (clutter_actor_iter_next (&iter, &child))
+ clutter_actor_paint (child);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]