ecore/wayland: Use sync callback to report end of ecore_wl_init().
authorRafael Antognolli <rafael.antognolli@intel.com>
Mon, 28 Oct 2013 16:07:25 +0000 (14:07 -0200)
committerRafael Antognolli <rafael.antognolli@intel.com>
Mon, 28 Oct 2013 16:47:33 +0000 (14:47 -0200)
commitccdeae7ce498d21088e4b0849ceb2394148f9877
treed51a2523e534ca23aa45a17779b058cf0ee45fcd
parent3aca95bb22cac0f0ab86eede49a3118fbcc7c93e
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.
src/lib/ecore_wayland/Ecore_Wayland.h
src/lib/ecore_wayland/ecore_wl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c