devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ffa12c3820d75bf208703dddd303e0ff716fef1d

commit ffa12c3820d75bf208703dddd303e0ff716fef1d
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon Sep 28 10:40:03 2015 -0400

    ecore-wl2: Fix not sending compositor reguests when we use
    ecore_wl2_display_connect
    
    Summary: If we do Not listen for ECORE_FD_WRITE on the file descriptor
    handler, then we never send a wl_display_flush which means we don't
    send requests to the compositor and thus nothing ever renders. Fix
    that by listening for FD_WRITE and calling wl_display_flush.
    
    @fix
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index afa6d52..aef10a2 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -175,8 +175,14 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
         return ECORE_CALLBACK_CANCEL;
      }
 
-   /* if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) */
-   ret = wl_display_dispatch(ewd->wl.display);
+   if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ))
+     ret = wl_display_dispatch(ewd->wl.display);
+   else if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE))
+     {
+        ret = wl_display_flush(ewd->wl.display);
+        if (ret == 0)
+          ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
+     }
 
    if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
      {
@@ -351,7 +357,7 @@ ecore_wl2_display_connect(const char *name)
 
    ewd->fd_hdl =
      ecore_main_fd_handler_add(wl_display_get_fd(ewd->wl.display),
-                               ECORE_FD_READ | ECORE_FD_ERROR,
+                               ECORE_FD_READ | ECORE_FD_WRITE | ECORE_FD_ERROR,
                                _cb_connect_data, ewd, NULL, NULL);
 
    wl_registry_add_listener(wl_display_get_registry(ewd->wl.display),

-- 


Reply via email to