libinput polling
Stefanos A.
stapostol at gmail.com
Tue Jul 15 09:13:59 PDT 2014
2014-07-15 17:32 GMT+02:00 Thiago Macieira <thiago at kde.org>:
> On Tuesday 15 July 2014 11:51:40 Stefanos A. wrote:
> > while (!exit) {
> > int ret = poll(&pfd, 1, -1);
> > if (ret < 0) {
> > // ret is always -1
> > exit = ret;
> > }
> > else {
> > // never gets here
> > libinput_dispatch(input_context);
> > }
> > }
> >
> > If I remove 'poll' then I can retrieve input events without any trouble.
> >
> > Is what I am trying to do supported? If so, what could be the problem?
> Or,
> > if not, then is there a supported way to block on libinput events?
>
> What errno are you getting?
>
The original code is not written in C, so I mistakenly assumed I couldn't
access errno. I checked the documentation and it appears I was wrong - so I
added the necessary code to retrieve errno and... poll() no longer returns
an error.
It may be that I have changed something in the meantime that resolves the
issue, whatever that was, although I cannot find anything relevant in the
git log. Oh well, the libinput driver is working correctly now. If
something comes up, and I can conclusively verify its not my code, I'll
follow up in bugzilla.
Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140715/4aa9003e/attachment.html>
More information about the wayland-devel
mailing list