ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #wayland
Net147 has quit [Quit: Quit]
Net147 has joined #wayland
abeltramo5 has quit [Quit: The Lounge - https://thelounge.chat]
abeltramo5 has joined #wayland
boogerwolf has joined #wayland
ofourdan has quit [Ping timeout: 480 seconds]
fmuellner_ has quit [Ping timeout: 480 seconds]
boogerwolf has left #wayland [#wayland]
nerdopolis has quit [Ping timeout: 480 seconds]
crazybyte has quit [Quit: Bye]
crazybyte has joined #wayland
Seirdy has joined #wayland
Company has quit [Quit: Leaving]
sima has joined #wayland
mxz has quit [Quit: cya]
mxz has joined #wayland
Szadek has quit [Ping timeout: 480 seconds]
Szadek has joined #wayland
Fxzxmic has joined #wayland
ahartmetz has quit [Ping timeout: 480 seconds]
kts has joined #wayland
kts has quit [Quit: Konversation terminated!]
ofourdan has joined #wayland
rederick29 has joined #wayland
tent405 has quit [Ping timeout: 480 seconds]
tent405 has joined #wayland
rv1sr has joined #wayland
iomari891 has joined #wayland
Vanfanel has joined #wayland
Vanfanel has left #wayland [#wayland]
molinari has joined #wayland
Vanfanel has joined #wayland
<Vanfanel> !who
Vanfanel_ has joined #wayland
Vanfanel_ has left #wayland [#wayland]
Vanfanel_ has joined #wayland
<Vanfanel> kennylevinsen: I have another small problem (the last one I hope). If I call wl_display_dispatch() after calling wl_display_prepare_read_queue(), then wl_display_dispatch() blocks forever.
<Vanfanel> In theory, wl_display_dispatch() blocks forever if there are no new events to process, but shouldn't the previous eglSwapBuffers() produce an event to be processed?
fmuellner has joined #wayland
nerdopolis has joined #wayland
<daniels> Vanfanel: no because it uses a dedicated queue
<daniels> please see the wl_display_prepare_read_queue docs
<daniels> you can’t just use a random throwaway queue but you need a real queue and need to use it consistently, and you also need the loop in the code snippet in the docs
<Vanfanel> daniels: do you mean eglSwapBuffers() uses a dedicated queue?
<kennylevinsen> yes, in order to never dispatch your events as this would cause issues
bodiccea_ has quit [Remote host closed the connection]
<Vanfanel> My understanding is that the wl_display already has a queue, because wl_display_dispatch() doesn't block forever unless I call wl_display_prepare_read_queue() previously.
<Vanfanel> Isn't it possible to simply use that default queue?
bodiccea has joined #wayland
<daniels> yeah, if you’re on the default queue then use wl_display_prepare_read with no queue arg
<daniels> and also do the read on the fd, and the loop, and the dispatch_pending
<daniels> either do that loop as in the docs, or just run wl_display_dispatch in a loop
<daniels> don’t mix and match the two things
<Vanfanel> daniels: First problem I am encountering is that passing NULL as second argument to wl_display_prepare_read_queue() causes a segfault. Of course, the wl_display is initialized and working. Any idea om why could that be happening? That should use the default wl_display queue, shouldn't it?
<Vanfanel> Maybe I understood it wring but, how am I supposed to use wl_display_prepare_read with no queue arg?
<Vanfanel> I mean, a second arg is needed.
<daniels> Vanfanel: no, I literally mean wl_display_prepare_read(), which does not take a queue arg. you use this if you are using the default queue. the _queue() variant is only usable if you have a queue you’ve created and your events are going to (you do not)
<daniels> but this is _still_ wrong, though less wrong. just call wl_display_dispatch() in a loop until you get your event. do not call prepare_read without reading from the fd
<Vanfanel> Ah sorry, thanks for your patience really
<daniels> np
<Vanfanel> daniels: I think I am doing exactly what you told me: I call prepare_read, then poll on the fd, then display_displatch() in a loop: https://github.com/vanfanel/RetroArch/blob/3c6c272c37d561f380a369c3c1b39323c4dc24df/gfx/drivers_context/wayland_ctx.c#L546
<Vanfanel> However, display_dispatch() still blocks forever. Can you see anything wrong, please?
<daniels> Vanfanel: missing wl_display_flush
<daniels> but also - just delete the prepare_read and the read - you don’t need those here, only dispatch
<daniels> so: add flush, remove prepare_read, remove poll/read, keep dispatch
<Vanfanel> daniels: that works, but I need the poll() to have a timeout. Maybe there's a better way to have a timeout?
<daniels> ok, in that case remove the dispatch, and copy the loop exactly from the prepare_read_queue doc
<daniels> you _must_ do those calls in that order
<daniels> like, exactly those
kts has joined #wayland
Company has joined #wayland
kts has quit [Remote host closed the connection]
kts has joined #wayland
kts has quit [Remote host closed the connection]
Fxzx_mic has joined #wayland
kts has joined #wayland
Fxzxmic has quit [Ping timeout: 480 seconds]
puck_ has quit [Remote host closed the connection]
puck_ has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
<Vanfanel> daniels: got it to work! Thanks a lot! :)
fmuellner has quit [Ping timeout: 480 seconds]
molinari has quit [Ping timeout: 480 seconds]
Vanfanel_ has quit [Ping timeout: 480 seconds]
molinari has joined #wayland
<daniels> Vanfanel: great! np
Fxzxmic has joined #wayland
molinari has quit [Ping timeout: 480 seconds]
Fxzx_mic has quit [Ping timeout: 480 seconds]
junaid has joined #wayland
Vanfanel_ has joined #wayland
kts has quit [Quit: Konversation terminated!]
Fxzxmic has quit [Quit: Konversation exit!]
Vanfanel_ has quit [Quit: Lost terminal]
radu24284303951534727071489559 has joined #wayland
junaid has quit [Ping timeout: 480 seconds]
molinari has joined #wayland
molinari has quit [Ping timeout: 480 seconds]
Leopold_ has quit []
Leopold has joined #wayland
junaid has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Ping timeout: 480 seconds]
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
junaid has quit [Ping timeout: 480 seconds]
Lyude has quit [Quit: Bouncer restarting]
Lyude has joined #wayland
Leopold has quit [Remote host closed the connection]
Lyude has quit [Quit: Bouncer restarting]
rv1sr has quit []
rederick29 has quit [Remote host closed the connection]
rasterman has joined #wayland
Leopold_ has joined #wayland
tent405 has quit [Quit: tent405]
sima has quit [Ping timeout: 480 seconds]
tent405 has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
Brainium has joined #wayland
Leopold_ has quit []
nerdopolis has joined #wayland
Leopold_ has joined #wayland
CodeSpelunker has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
Brainium has quit [Read error: Connection reset by peer]
Brainium has joined #wayland
fmuellner has joined #wayland