|
|
|
@ -1,21 +1,6 @@ |
|
|
|
|
#define E_COMP_WL |
|
|
|
|
#include "e.h" |
|
|
|
|
|
|
|
|
|
static struct wl_resource * |
|
|
|
|
_e_comp_wl_data_find_for_client(Eina_List *list, struct wl_client *client) |
|
|
|
|
{ |
|
|
|
|
Eina_List *l; |
|
|
|
|
struct wl_resource *res; |
|
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(list, l, res) |
|
|
|
|
{ |
|
|
|
|
if (wl_resource_get_client(res) == client) |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
_e_comp_wl_data_offer_cb_accept(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, uint32_t serial, const char *mime_type) |
|
|
|
|
{ |
|
|
|
@ -174,8 +159,7 @@ _e_comp_wl_data_device_destroy_selection_data_source(struct wl_listener *listene |
|
|
|
|
if (focus) |
|
|
|
|
{ |
|
|
|
|
data_device_res =
|
|
|
|
|
_e_comp_wl_data_find_for_client(e_comp->wl_comp_data->mgr.data_resources, |
|
|
|
|
wl_resource_get_client(source->resource)); |
|
|
|
|
e_comp_wl_data_find_for_client(wl_resource_get_client(source->resource)); |
|
|
|
|
|
|
|
|
|
if (data_device_res) |
|
|
|
|
wl_data_device_send_selection(data_device_res, NULL); |
|
|
|
@ -259,8 +243,7 @@ _e_comp_wl_data_device_selection_set(void *data EINA_UNUSED, E_Comp_Wl_Data_Sour |
|
|
|
|
if (focus) |
|
|
|
|
{ |
|
|
|
|
data_device_res = |
|
|
|
|
_e_comp_wl_data_find_for_client(e_comp->wl_comp_data->mgr.data_resources, |
|
|
|
|
wl_resource_get_client(focus)); |
|
|
|
|
e_comp_wl_data_find_for_client(wl_resource_get_client(focus)); |
|
|
|
|
if ((data_device_res) && (source)) |
|
|
|
|
{ |
|
|
|
|
offer_res = |
|
|
|
@ -679,8 +662,7 @@ e_comp_wl_data_device_keyboard_focus_set(void) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
data_device_res = |
|
|
|
|
_e_comp_wl_data_find_for_client(e_comp->wl_comp_data->mgr.data_resources, |
|
|
|
|
wl_resource_get_client(focus)); |
|
|
|
|
e_comp_wl_data_find_for_client(wl_resource_get_client(focus)); |
|
|
|
|
if (!data_device_res) return; |
|
|
|
|
|
|
|
|
|
source = (E_Comp_Wl_Data_Source*)e_comp->wl_comp_data->selection.data_source; |
|
|
|
@ -727,3 +709,18 @@ e_comp_wl_data_manager_shutdown(void) |
|
|
|
|
|
|
|
|
|
wl_list_remove(&e_comp->wl_comp_data->clipboard.listener.link); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EINTERN struct wl_resource * |
|
|
|
|
e_comp_wl_data_find_for_client(struct wl_client *client) |
|
|
|
|
{ |
|
|
|
|
Eina_List *l; |
|
|
|
|
struct wl_resource *res; |
|
|
|
|
|
|
|
|
|
EINA_LIST_FOREACH(e_comp->wl_comp_data->mgr.data_resources, l, res) |
|
|
|
|
{ |
|
|
|
|
if (wl_resource_get_client(res) == client) |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return NULL; |
|
|
|
|
} |
|
|
|
|