discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=11e374ce134eaa602069bb5a42088641e2537718

commit 11e374ce134eaa602069bb5a42088641e2537718
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Aug 11 15:27:00 2015 -0400

    only create fd handler for wl clipboard data source if fd is passed
---
 src/bin/e_comp_wl_data.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/bin/e_comp_wl_data.c b/src/bin/e_comp_wl_data.c
index 9831d52..3c2ad61 100644
--- a/src/bin/e_comp_wl_data.c
+++ b/src/bin/e_comp_wl_data.c
@@ -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));
 
-   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;
+   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;
 

-- 


Reply via email to