struct wl_resource *cbhm;
struct wl_resource *secondary;
Eina_List *data_only_list;
+ Eina_Bool secondary_selection_sent;
} selection;
struct
data_device_res = e_comp_wl_data_find_for_client(cbhm_client);
if ((data_device_res) && (source))
{
- offer_res =
- _e_comp_wl_data_device_data_offer_create(source,
- data_device_res);
+ offer_res = _e_comp_wl_data_device_data_offer_create(source, data_device_res);
wl_data_device_send_selection(data_device_res, offer_res);
+
+ if ((secondary_selection_client) && (secondary_selection_client == source_client))
+ e_comp_wl->selection.secondary_selection_sent = EINA_TRUE;
}
}
else
/* send wl_data_device@selection to secondary selection client */
if (secondary_selection_client)
{
- if (secondary_selection_client != source_client)
+ if ((e_comp_wl->selection.secondary_selection_sent != EINA_TRUE) &&
+ (secondary_selection_client != source_client))
{
data_device_res = e_comp_wl_data_find_for_client(secondary_selection_client);
if ((data_device_res) && (source))
else if (data_device_res)
wl_data_device_send_selection(data_device_res, NULL);
}
+ else
+ {
+ e_comp_wl->selection.secondary_selection_sent = EINA_FALSE;
+ }
}
/* send wl_data_device@selection to focused client */
e_comp_wl->selection.cbhm = NULL;
if (e_comp_wl->selection.secondary == surface->base.surface)
- e_comp_wl->selection.secondary = NULL;
+ {
+ e_comp_wl->selection.secondary = NULL;
+ e_comp_wl->selection.secondary_selection_sent = EINA_FALSE;
+ }
if (surface->base.viewport_transform)
{