data-device: cleanup after touch drag

This change fixes the "touch-up" operation to clear "data_source"
by setting "seat" to NULL.  This operation is done in the mouse button
release operation, but seems to have been forgotten in the "touch up"
case.

Forgetting this operation causes weston to send a "premature finish
request" error to the client which causes the client to exit.

This issue can be reproduced with the "weston-dnd" program by performing
a drag-and-drop operation with a touch input device. Once the drag
is released, the weston-dnd program will exit with an error.

Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
dev
Jonathan Marler 4 years ago committed by Daniel Stone
parent 5ba5a86a7f
commit d3223cc4b4
  1. 4
      libweston/data-device.c

@ -757,8 +757,10 @@ drag_grab_touch_up(struct weston_touch_grab *grab,
if (touch_drag->base.focus_resource)
wl_data_device_send_drop(touch_drag->base.focus_resource);
if (touch_drag->base.data_source)
if (touch_drag->base.data_source) {
touch_drag->base.data_source->seat = NULL;
wl_list_remove(&touch_drag->base.data_source_listener.link);
}
data_device_end_touch_drag_grab(touch_drag);
}

Loading…
Cancel
Save