[clutter/wip/wayland-2: 14/22] clutter-wayland-surface: Fix the pick method



commit 42e0608fbf93bbb246ee266a82d9c5eb717917fa
Author: Neil Roberts <neil linux intel com>
Date:   Wed Jan 11 18:11:51 2012 +0000

    clutter-wayland-surface: Fix the pick method
    
    The pick method should bail out if the actor is not reactive.

 clutter/wayland/clutter-wayland-surface.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/clutter/wayland/clutter-wayland-surface.c b/clutter/wayland/clutter-wayland-surface.c
index 93258fa..979a8bb 100644
--- a/clutter/wayland/clutter-wayland-surface.c
+++ b/clutter/wayland/clutter-wayland-surface.c
@@ -338,12 +338,15 @@ static void
 clutter_wayland_surface_pick (ClutterActor *self,
                               const ClutterColor *color)
 {
-  ClutterActorBox box;
+  if (clutter_actor_should_pick_paint (self))
+    {
+      ClutterActorBox box;
 
-  cogl_set_source_color4ub (color->red, color->green, color->blue,
-                            color->alpha);
-  clutter_actor_get_allocation_box (self, &box);
-  cogl_rectangle (0, 0, box.x2 - box.x1, box.y2 - box.y1);
+      cogl_set_source_color4ub (color->red, color->green, color->blue,
+                                color->alpha);
+      clutter_actor_get_allocation_box (self, &box);
+      cogl_rectangle (0, 0, box.x2 - box.x1, box.y2 - box.y1);
+    }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]