<div dir="ltr">Ok! this sounds very promising this should decouple the rendering thread and the input handling thread.<div>so i can set to the wl_seat client object a new queue and then pass this queue to <span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:14px;font-weight:bold;line-height:18.046875px">wl_display_dispatch_queue </span><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:14px;line-height:18.046875px">call in the input thread.</span></div>
<div><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:14px;line-height:18.046875px"><br>
</span></div><div><font color="#000000" face="liberation sans, Myriad , Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="font-size:14px;line-height:18.046875px">but one </span></font><font color="#000000" face="liberation sans, Myriad , Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px">question</span></font><font color="#000000" face="liberation sans, Myriad , Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="font-size:14px;line-height:18.046875px"> to this: the documentation of </span></font><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:13.63636302947998px;font-weight:bold;line-height:18.039772033691406px">wl_display_dispatch_queue</span><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:13.63636302947998px;font-weight:bold;line-height:18.039772033691406px"> </span><font color="#000000" face="liberation sans, Myriad , Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="font-size:14px;line-height:18.046875px">says:</span></font><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:14px;line-height:18.046875px"> </span></div>
<div><span style="color:rgb(0,0,0);font-family:'liberation sans','Myriad ','Bitstream Vera Sans','Lucida Grande','Luxi Sans','Trebuchet MS',helvetica,verdana,arial,sans-serif;font-size:14px;line-height:18.046875px">"For other threads this will block until the main thread queues events on the queue passed as argument."</span></div>
<div><font color="#000000" face="liberation sans, Myriad, Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px"><br></span></font></div>
<div><font color="#000000" face="liberation sans, Myriad, Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px">So will pass the events in the queue or how to achieve this it the second thread( rendering thread is sleeping)??</span></font></div>
<div><font color="#000000" face="liberation sans, Myriad, Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px"><br></span></font></div>
<div><font color="#000000" face="liberation sans, Myriad, Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px">In my use case the input thread should wake up when input event arrives from the compositor also when all other thread of the client are idle.</span></font></div>
<div><font color="#000000" face="liberation sans, Myriad, Bitstream Vera Sans, Lucida Grande, Luxi Sans, Trebuchet MS, helvetica, verdana, arial, sans-serif"><span style="line-height:18.039772033691406px"><br></span></font></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/19 Giulio Camuffo <span dir="ltr"><<a href="mailto:giuliocamuffo@gmail.com" target="_blank">giuliocamuffo@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You can move a client-side wayland object to a queue using the function<br>
void wl_proxy_set_queue(struct wl_proxy *proxy, struct wl_event_queue *queue).<br>
All the client-side objects are really wl_proxy, so you can safely cast them.<br>
If you move to a queue an object which creates new objects and<br>
dispatches them through<br>
an event those objects will be in the same queue too.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
2013/10/18 Eugen Friedrich <<a href="mailto:friedrix@gmail.com">friedrix@gmail.com</a>>:<br>
> Hallo Giulio,<br>
> thanks a lot for the fast replay.<br>
><br>
> if my understanding is correct the frame callbacks and the input handling<br>
> events are coming from the compositor to the main wayland display queue on<br>
> the client side.<br>
> So how i can get the different queues on the client site or is there a<br>
> possibility to get a separate queue for input events?<br>
><br>
><br>
> 2013/10/18 Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>><br>
>><br>
>> Oh, I sent my mail before the second one arrived.<br>
>><br>
>> Yeah, you need to use different wl_event_queues, and the relative<br>
>> functions like<br>
>> wl_display_dispatch_queue.<br>
>><br>
>> 2013/10/18 Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>>:<br>
>> > And what is it that doesn't work? As a wild bet I'd say you probably<br>
>> > want to look at wl_event_queue.<br>
>> > See<br>
>> > <a href="http://wayland.freedesktop.org/docs/html/chap-Library.html#sect-Library-Client" target="_blank">http://wayland.freedesktop.org/docs/html/chap-Library.html#sect-Library-Client</a><br>
>> ><br>
>> > Giulio<br>
>> ><br>
>> > 2013/10/18 Eugen Friedrich <<a href="mailto:friedrix@gmail.com">friedrix@gmail.com</a>>:<br>
>> >> Hallo dear Wayland developer,<br>
>> >><br>
>> >> I thing i have a very common use case and currently i don't now how to<br>
>> >> get<br>
>> >> it work in wayland.<br>
>> >><br>
>> >> We have a wayland client application with 2 threads:<br>
>> >><br>
>> >> thread1 - rendering thread - the eglSwapbuffer will call<br>
>> >> wl_display_dispatch internally:<br>
>> >> thread2 - input thread - this should wait for wayland input events<br>
>> >><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> wayland-devel mailing list<br>
>> >> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
>> >> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
>> >><br>
><br>
><br>
</div></div></blockquote></div><br></div>