summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-08-30 12:16:34 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-08-30 14:11:47 -0500
commite0d94b8234f32440f71a66249337ee541cf97c52 (patch)
tree4e2eb55259a60b117135d21b16332a1ca884da1e /src/lib/ecore_wl2
parent4e41f7569bfb1ca2fa5591e96ea31df5af6fa6ad (diff)
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.
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index 57f98cdcfc..69838f77bc 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -514,7 +514,7 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
514 { 514 {
515 ret = wl_display_flush(ewd->wl.display); 515 ret = wl_display_flush(ewd->wl.display);
516 code = errno; 516 code = errno;
517 if (ret == 0) 517 if (ret >= 0)
518 ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ); 518 ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
519 519
520 if ((ret < 0) && (code != EAGAIN)) goto err; 520 if ((ret < 0) && (code != EAGAIN)) goto err;