diff options
author | emersion <contact@emersion.fr> | 2018-12-09 12:42:27 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-12-09 12:42:27 +0100 |
commit | c2113decb3adf1ba67e26df9d93a442128f6d57d (patch) | |
tree | 6a615c141c938e8933231b27f558a112906192d4 | |
parent | 8c573bc7c6b3029f2d3dc5c6fe45bf1078a66485 (diff) |
gtk-primary-selection: warn when offering MIME type after set_selection
-rw-r--r-- | types/wlr_gtk_primary_selection.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/types/wlr_gtk_primary_selection.c b/types/wlr_gtk_primary_selection.c index ca82b3e7..18bc624a 100644 --- a/types/wlr_gtk_primary_selection.c +++ b/types/wlr_gtk_primary_selection.c @@ -98,6 +98,7 @@ static void destroy_offer(struct wl_resource *resource) { struct client_data_source { struct wlr_primary_selection_source source; struct wl_resource *resource; + bool finalized; }; static void client_source_send( @@ -138,6 +139,9 @@ static void source_handle_offer(struct wl_client *client, if (source == NULL) { return; } + if (source->finalized) { + wlr_log(WLR_DEBUG, "Offering additional MIME type after set_selection"); + } char *dup_mime_type = strdup(mime_type); if (dup_mime_type == NULL) { @@ -200,6 +204,7 @@ static void device_handle_set_selection(struct wl_client *client, struct wlr_primary_selection_source *source = NULL; if (client_source != NULL) { + client_source->finalized = true; source = &client_source->source; } |