workaround code was added like below.
remove it, because this code causes deadlock error.
commit
668850643f72daa89c857c1cc78d49578a927794
Author: Duna Oh <duna.oh@samsung.com>
Date: Tue Apr 21 12:34:44 2015 +0900
e_comp_wl: add call to dispatch the requests of binding wayland global interfaces
Summary:
- Add call to dispatch the requests of creating a wayldand client, getting the registry, and binding global interfaces, because we need global objects immediately after we request.
- Load desktop shell module while initting e_comp, not idle time.
Test Plan:
(1) Run enlightenment on wayland
(2) If e_module attemps to make the "Error loading Module" popup window, you will see deadlock waiting for the wayland sync "done" event to be received.
This means the wayland global interfaces including wl.compositor is not ready.
below is the mainloop we are blocked
---------------------------------------------------------------
_ecore_wl_init_wait(void)
{
while (!_ecore_wl_disp->init_done)
wl_display_dispatch(_ecore_wl_disp->wl.display);
}
Change-Id: I13336dc7e35101915f4d8808488df0fa7d7698a0
ecore_wl_server_mode_set(1);
- /* try to init ecore_wayland */
- if (!ecore_wl_init(NULL))
- {
- e_error_message_show(_("Enlightenment cannot initialize Ecore_Wayland!\n"));
- return EINA_FALSE;
- }
-
- wl_event_loop_dispatch(e_comp->wl_comp_data->wl.loop, -1); //server calls wl_client_create()
-
- ecore_wl_flush(); // client sendmsg wl_display.get_registry request
- wl_event_loop_dispatch(e_comp->wl_comp_data->wl.loop, -1); // server calls display_get_registry()
- wl_display_flush_clients(e_comp->wl_comp_data->wl.disp); // server flushes wl_registry.global events
-
- ecore_wl_display_iterate(); // client handles global events and make 'bind' requests to each global interfaces
-
- ecore_wl_flush(); // client sendmsg wl_registry.bind requests
- wl_event_loop_dispatch(e_comp->wl_comp_data->wl.loop, -1); // server calls registry_bind() using given interfaces' name
-
/* create hash to store clients */
/* clients_win_hash = eina_hash_int64_new(NULL); */
clients_buffer_hash = eina_hash_pointer_new(NULL);