input handlig in separate thread

Giulio Camuffo giuliocamuffo at gmail.com
Sat Oct 19 18:59:05 CEST 2013


You can move a client-side wayland object to a queue using the function
void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue).
All the client-side objects are really wl_proxy, so you can safely cast them.
If you move to a queue an object which creates new objects and
dispatches them through
an event those objects will be in the same queue too.


2013/10/18 Eugen Friedrich <friedrix at gmail.com>:
> Hallo Giulio,
> thanks a lot for the fast replay.
>
> if my understanding is correct the frame callbacks and the input handling
> events are coming from the compositor to the main wayland display queue on
> the client side.
> So how i can get the different queues on the client site or is there a
> possibility to get a separate queue for input events?
>
>
> 2013/10/18 Giulio Camuffo <giuliocamuffo at gmail.com>
>>
>> Oh, I sent my mail before the second one arrived.
>>
>> Yeah, you need to use different wl_event_queues, and the relative
>> functions like
>> wl_display_dispatch_queue.
>>
>> 2013/10/18 Giulio Camuffo <giuliocamuffo at gmail.com>:
>> > And what is it that doesn't work? As a wild bet I'd say you probably
>> > want to look at wl_event_queue.
>> > See
>> > http://wayland.freedesktop.org/docs/html/chap-Library.html#sect-Library-Client
>> >
>> > Giulio
>> >
>> > 2013/10/18 Eugen Friedrich <friedrix at gmail.com>:
>> >> Hallo dear Wayland developer,
>> >>
>> >> I thing i have a very common use case and currently i don't now how to
>> >> get
>> >> it work in wayland.
>> >>
>> >> We have a wayland client application with 2 threads:
>> >>
>> >> thread1 - rendering thread - the eglSwapbuffer will  call
>> >> wl_display_dispatch internally:
>> >> thread2 - input thread - this should wait for wayland input events
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> wayland-devel mailing list
>> >> wayland-devel at lists.freedesktop.org
>> >> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>> >>
>
>


More information about the wayland-devel mailing list