From f44003f04bcffcaa64d811a45efea569c0dee23e Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 7 Oct 2018 15:57:08 +0200 Subject: data-device: remove wlr_data_source.seat_client Since the source doesn't always come from a client, this field doesn't make sense. It is replaced by a new "finalized" field in wlr_client_data_source. This is used to make sure set_actions is not sent after start_drag has been sent. A check in data_offer_choose_action has been removed: if an offer has been sent then start_drag has been called, no need to check. I also wanted to add a check for wl_data_source.offer, but it turns out (1) this isn't in the spec (2) it breaks GTK+. This is some preliminary work for Firefox on Wayland compatibility. --- include/types/wlr_data_device.h | 1 + include/wlr/types/wlr_data_device.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/types/wlr_data_device.h b/include/types/wlr_data_device.h index 972294ff..388e91a5 100644 --- a/include/types/wlr_data_device.h +++ b/include/types/wlr_data_device.h @@ -11,6 +11,7 @@ struct wlr_client_data_source { struct wlr_data_source source; struct wlr_data_source_impl impl; struct wl_resource *resource; + bool finalized; }; extern const struct wlr_surface_role drag_icon_surface_role; diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index c45e8d1c..9ce8f400 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -73,7 +73,6 @@ struct wlr_data_source { // source status bool accepted; struct wlr_data_offer *offer; - struct wlr_seat_client *seat_client; // drag'n'drop status enum wl_data_device_manager_dnd_action current_dnd_action; -- cgit v1.2.3