wcore_wl: Handle errors on wayland display fd

Cancel the callback if we receive an error on the wayland display
file descriptor.
This commit is contained in:
Stefan Schmidt 2014-04-17 16:16:57 +02:00
parent 2029ffc1ad
commit 08bad99597
1 changed files with 8 additions and 1 deletions

View File

@ -535,7 +535,14 @@ _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl)
if (!(ewd = data)) return ECORE_CALLBACK_RENEW;
/* FIXME: This should also catch ECORE_FD_ERROR and exit */
if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_ERROR))
{
ERR("Received error on wayland display fd");
_ecore_wl_fatal_error = EINA_TRUE;
_ecore_wl_signal_exit();
return ECORE_CALLBACK_CANCEL;
}
/* wl_display_dispatch_pending(ewd->wl.display); */