forked from enlightenment/enlightenment
only create fd handler for wl clipboard data source if fd is passed
This commit is contained in:
parent
ebc6c0ee35
commit
11e374ce13
|
@ -890,11 +890,14 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd
|
|||
eina_list_append(source->data_source.mime_types,
|
||||
eina_stringshare_add(mime_type));
|
||||
|
||||
if (fd > 0)
|
||||
{
|
||||
source->fd_handler =
|
||||
ecore_main_fd_handler_add(fd, ECORE_FD_READ,
|
||||
_e_comp_wl_clipboard_source_save,
|
||||
e_comp->wl_comp_data, NULL, NULL);
|
||||
if (!source->fd_handler) return NULL;
|
||||
}
|
||||
|
||||
source->fd = fd;
|
||||
|
||||
|
|
Loading…
Reference in New Issue