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.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-09-28 10:40:03 -04:00
parent f8e3bc944f
commit ffa12c3820
1 changed files with 9 additions and 3 deletions

View File

@ -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),