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
This commit is contained in:
Carlos Garnacho 2016-05-03 13:32:18 +02:00
parent 4cfc21d49d
commit 15db18901c

View File

@ -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);
}
}