From 15db18901cdd4dc2f969363a94b3b8c636f6d431 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 3 May 2016 13:32:18 +0200 Subject: [PATCH] wayland: Forward touchpad pinch n_fingers information to clients We used to hardcode 2 because those were the only events we used to handle. Now the ClutterTouchpadPinchEvent will tell us. https://bugzilla.gnome.org/show_bug.cgi?id=765937 --- src/wayland/meta-wayland-pointer-gesture-pinch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-pointer-gesture-pinch.c b/src/wayland/meta-wayland-pointer-gesture-pinch.c index f2f3a6e5b..7f5da2267 100644 --- a/src/wayland/meta-wayland-pointer-gesture-pinch.c +++ b/src/wayland/meta-wayland-pointer-gesture-pinch.c @@ -38,18 +38,19 @@ handle_pinch_begin (MetaWaylandPointer *pointer, MetaWaylandPointerClient *pointer_client; MetaWaylandSeat *seat; struct wl_resource *resource; - uint32_t serial; + uint32_t serial, fingers; pointer_client = pointer->focus_client; seat = meta_wayland_pointer_get_seat (pointer); serial = wl_display_next_serial (seat->wl_display); + fingers = clutter_event_get_touchpad_gesture_finger_count (event); wl_resource_for_each (resource, &pointer_client->pinch_gesture_resources) { zwp_pointer_gesture_pinch_v1_send_begin (resource, serial, clutter_event_get_time (event), pointer->focus_surface->resource, - 2); + fingers); } }