diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2016-03-31 13:15:33 -0500 |
---|---|---|
committer | Mike Blumenkrantz <zmike@osg.samsung.com> | 2016-03-31 14:26:02 -0400 |
commit | 79a770b638343e91bd4d9e002d02df6922b2fb9f (patch) | |
tree | 1141aeb23590e0c52b2d136852b5301f1292fd7d | |
parent | 6007a51f17420194b7179db4fd55c9086ece06e5 (diff) | |
download | enlightenment-79a770b638343e91bd4d9e002d02df6922b2fb9f.tar.gz |
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>
-rw-r--r-- | src/bin/e_comp_wl_data.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c index 8183a9632a..299745cd68 100644 --- a/src/bin/e_comp_wl_data.c +++ b/src/bin/e_comp_wl_data.c @@ -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); |