ecore_wl2: Fix small bug in flush handler

If wl_display_flush() returns a non negative number it was successful,
so we should disable the write handler then.  We were theoretically always
doing an extra flush on an empty buffer.

This is mostly cosmetic as that's not a costly operation.
This commit is contained in:
Derek Foreman 2017-08-30 12:16:34 -05:00
parent 4e41f7569b
commit e0d94b8234
1 changed files with 1 additions and 1 deletions

View File

@ -514,7 +514,7 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
{
ret = wl_display_flush(ewd->wl.display);
code = errno;
if (ret == 0)
if (ret >= 0)
ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
if ((ret < 0) && (code != EAGAIN)) goto err;