ecore-wl2: Fix issue of compositors not flushing clients properly
Summary: When we use ecore_wl2 for creating compositors (E), we need to flush clients before we dispatch events on the wl loop, so add a prepare_callback for the fd handlers and flush clients there. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
f444bf45f5
commit
47cd4d4168
|
@ -160,11 +160,21 @@ _cb_create_data(void *data, Ecore_Fd_Handler *hdl)
|
|||
|
||||
loop = wl_display_get_event_loop(ewd->wl.display);
|
||||
wl_event_loop_dispatch(loop, 0);
|
||||
wl_display_flush_clients(ewd->wl.display);
|
||||
|
||||
/* wl_display_flush_clients(ewd->wl.display); */
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_create_prepare(void *data, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
||||
{
|
||||
Ecore_Wl2_Display *ewd;
|
||||
|
||||
ewd = data;
|
||||
wl_display_flush_clients(ewd->wl.display);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
|
||||
{
|
||||
|
@ -392,6 +402,8 @@ ecore_wl2_display_create(const char *name)
|
|||
ECORE_FD_READ | ECORE_FD_ERROR,
|
||||
_cb_create_data, ewd, NULL, NULL);
|
||||
|
||||
ecore_main_fd_handler_prepare_callback_set(ewd->fd_hdl,
|
||||
_cb_create_prepare, ewd);
|
||||
return ewd;
|
||||
|
||||
socket_err:
|
||||
|
|
Loading…
Reference in New Issue