From 5298cf0a3a5e42e1995f5a36a83e2d0a352a73f7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 11 Mar 2014 15:13:15 -0400 Subject: [PATCH] wayland: Pull in a fix for a FIXME from Weston --- src/wayland/meta-wayland-data-device.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-data-device.c b/src/wayland/meta-wayland-data-device.c index 11c329e73..0785c6d51 100644 --- a/src/wayland/meta-wayland-data-device.c +++ b/src/wayland/meta-wayland-data-device.c @@ -318,8 +318,12 @@ data_device_start_drag (struct wl_client *client, { MetaWaylandSeat *seat = wl_resource_get_user_data (resource); MetaWaylandDragGrab *drag_grab; - /* FIXME: Check that client has implicit grab on the origin - * surface that matches the given time. */ + + if ((seat->pointer.button_count == 0 || + seat->pointer.grab_serial != serial || + !seat->pointer.focus_surface || + seat->pointer.focus_surface != wl_resource_get_user_data (origin_resource))) + return; /* FIXME: Check that the data source type array isn't empty. */