devilhorns pushed a commit to branch master.

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

commit c3ca3f07bc6f57b0c46de592ba5b59123a6ee89a
Author: Chris Michael <[email protected]>
Date:   Tue Mar 18 07:39:44 2014 +0000

    ecore-wayland: Fix ecore_wl_init 'stalling' when used in a server
    
    @fix: If we are using the ecore_wl library in a "server", we cannot
    sit and 'sync' during the init process as that just leaves the server
    in a stalled state waiting for ecore_wl_init to complete (which never
    does because the server has not finished it's work).
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wayland/ecore_wl.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index 89a42e7..01e022f 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -210,10 +210,14 @@ ecore_wl_init(const char *name)
    _ecore_wl_window_init();
    _ecore_wl_events_init();
 
-   _ecore_wl_disp->init_done = EINA_FALSE;
-   callback = wl_display_sync(_ecore_wl_disp->wl.display);
-   wl_callback_add_listener(callback, &_ecore_wl_init_sync_listener,
-                            _ecore_wl_disp);
+   _ecore_wl_disp->init_done = EINA_TRUE;
+   if (!_ecore_wl_server_mode)
+     {
+        _ecore_wl_disp->init_done = EINA_FALSE;
+        callback = wl_display_sync(_ecore_wl_disp->wl.display);
+        wl_callback_add_listener(callback, &_ecore_wl_init_sync_listener,
+                                 _ecore_wl_disp);
+     }
 
    return _ecore_wl_init_count;
 }

-- 


Reply via email to