diff options
author | emersion <contact@emersion.fr> | 2017-12-18 00:44:43 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-18 00:44:43 +0100 |
commit | 804c7a73a6d7af18e202109d331d1208af7f57d4 (patch) | |
tree | 43846af1e1234ca1a83ac94c593f3996eac9def2 | |
parent | 810c4b119bcce2c55ddca8933cbc89381602674b (diff) |
Allow clients to unset the selection
-rw-r--r-- | types/wlr_data_device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/types/wlr_data_device.c b/types/wlr_data_device.c index dacb2a45..b27009dc 100644 --- a/types/wlr_data_device.c +++ b/types/wlr_data_device.c @@ -335,11 +335,11 @@ void wlr_seat_set_selection(struct wlr_seat *seat, static void data_device_set_selection(struct wl_client *client, struct wl_resource *dd_resource, struct wl_resource *source_resource, uint32_t serial) { - if (!source_resource) { - return; + struct wlr_data_source *source = NULL; + if (source_resource != NULL) { + source = wl_resource_get_user_data(source_resource); } - struct wlr_data_source *source = wl_resource_get_user_data(source_resource); struct wlr_seat_client *seat_client = wl_resource_get_user_data(dd_resource); |