forked from enlightenment/enlightenment
wayland: Stop E from consuming all CPU as soon as a selection is made
Clipboard fds from clients are regular files, which shouldn't be passed to fd_handler_add. Using the wrong add function causes epoll to return immediately and we end up running idle handlers and burning cpu. Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
This commit is contained in:
parent
6007a51f17
commit
79a770b638
|
@ -937,9 +937,9 @@ e_comp_wl_clipboard_source_create(const char *mime_type, uint32_t serial, int fd
|
|||
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);
|
||||
ecore_main_fd_handler_file_add(fd, ECORE_FD_READ | ECORE_FD_ERROR,
|
||||
_e_comp_wl_clipboard_source_save,
|
||||
e_comp->wl_comp_data, NULL, NULL);
|
||||
if (!source->fd_handler)
|
||||
{
|
||||
_mime_types_free(&source->data_source);
|
||||
|
|
Loading…
Reference in New Issue