added more X11 code

This commit is contained in:
hyunghwan.chung
2017-06-27 16:03:29 +00:00
parent 979040e7b3
commit a2877ac905
4 changed files with 113 additions and 69 deletions

View File

@ -800,6 +800,12 @@ static int _add_poll_fd (moo_t* moo, int fd, int event_mask, moo_oow_t event_dat
MOO_ASSERT (moo, xtn->ep >= 0);
ev.events = event_mask;
#if defined(USE_THREAD) && defined(EPOLLET)
/* epoll_wait may return again if the worker thread consumes events.
* switch to level-trigger. */
/* TODO: verify if EPOLLLET is desired */
ev.events |= EPOLLET;
#endif
ev.data.ptr = (void*)event_data;
if (epoll_ctl (xtn->ep, EPOLL_CTL_ADD, fd, &ev) == -1)
{