summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-10-28 14:07:25 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-10-28 14:47:33 -0200
commitccdeae7ce498d21088e4b0849ceb2394148f9877 (patch)
treed51a2523e534ca23aa45a17779b058cf0ee45fcd /src/modules
parent3aca95bb22cac0f0ab86eede49a3118fbcc7c93e (diff)
ecore/wayland: Use sync callback to report end of ecore_wl_init().
At the end of the ecore_wl_init() function, send a sync request to the server, and add a callback listener to the "done" event. When this event is received, we are sure that all the registry bind requests done so far were processed already, and that the registry and globals are available and can be used. Now, on the functions that request interfaces or registry, we call _ecore_wl_init_wait(), which will check if the callback was received already (that means that all requests inside the init were processed). If it was not yet, then we wait until receiving that callback, before returning the requested data.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c2
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c2
2 files changed, 0 insertions, 4 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index 9959c085ed..369d7ca561 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -112,8 +112,6 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
112 ERR("Failed to initialize Ecore_Wayland"); 112 ERR("Failed to initialize Ecore_Wayland");
113 return NULL; 113 return NULL;
114 } 114 }
115 else if (count >= 1)
116 ecore_wl_display_iterate();
117 115
118 if (!(ee = calloc(1, sizeof(Ecore_Evas)))) 116 if (!(ee = calloc(1, sizeof(Ecore_Evas))))
119 { 117 {
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 1e77a67c20..6cf845e6ca 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -111,8 +111,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
111 ERR("Failed to initialize Ecore_Wayland"); 111 ERR("Failed to initialize Ecore_Wayland");
112 return NULL; 112 return NULL;
113 } 113 }
114 else if (count >= 1)
115 ecore_wl_display_iterate();
116 114
117 if (!(ee = calloc(1, sizeof(Ecore_Evas)))) 115 if (!(ee = calloc(1, sizeof(Ecore_Evas))))
118 { 116 {