[mutter] wayland-pointer: Remove the conditional around the surface actor too



commit d1619e4f534183e77f1cbf567ca4d10df391771f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Apr 27 10:38:16 2014 -0400

    wayland-pointer: Remove the conditional around the surface actor too
    
    The actor should always exist.

 src/wayland/meta-wayland-pointer.c |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 57e07c0..388f92e 100644
--- a/src/wayland/meta-wayland-pointer.c
+++ b/src/wayland/meta-wayland-pointer.c
@@ -718,16 +718,11 @@ meta_wayland_pointer_get_relative_coordinates (MetaWaylandPointer *pointer,
                                               wl_fixed_t         *sy)
 {
   float xf = 0.0f, yf = 0.0f;
+  ClutterPoint pos;
 
-  ClutterActor *actor = CLUTTER_ACTOR (surface->surface_actor);
-
-  if (actor)
-    {
-      ClutterPoint pos;
-      clutter_input_device_get_coords (pointer->device, NULL, &pos);
-
-      clutter_actor_transform_stage_point (actor, pos.x, pos.y, &xf, &yf);
-    }
+  clutter_input_device_get_coords (pointer->device, NULL, &pos);
+  clutter_actor_transform_stage_point (CLUTTER_ACTOR (surface->surface_actor),
+                                       pos.x, pos.y, &xf, &yf);
 
   *sx = wl_fixed_from_double (xf);
   *sy = wl_fixed_from_double (yf);


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