ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
i509vcb has quit [Quit: Connection closed for inactivity]
fmuellner has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
shoragan has quit [Quit: quit]
shoragan has joined #wayland
<yrlf>
Hi! I have a core wayland protocol question: is it guaranteed that singleton globals like xdg_output_manager appear before globals that can appear multiple times like wl_output?
<yrlf>
or is the order of globals completely arbitrary
<yrlf>
and the only thing that I can rely on is all singleton globals appearing after the first round trip
nerdopolis has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
<danieldg>
with wl_output v5 you mostly don't need xdg-output anyway
<danieldg>
but yeah, if you need to bind it, you have to handle both orders
<danieldg>
(sorry, v4)
nerdopolis has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
<soreau>
wl_output v4 has the output name finally?
<soreau>
yrlf: the order of the globals depends on the order the compositor sends them
<soreau>
but I don't think it's strictly guaranteed that all globals will be sent after a single roundtrip call; i.e. there's no 'done' event..
<soreau>
sometimes I wonder if it's a good idea to write `while (!global) wl_display_roundtrip();`
<danieldg>
soreau: globals are guaranteed to show up after one roundtrip
<danieldg>
it's possible to add them later, but that's in response to events (monitor power-on, etc) and so more round-trips won't do anything but waste CPU
<danieldg>
if it *wasn't* guaranteed then there would need to be an end
<soreau>
danieldg: I mean what if there's a future where there's like.. a *lot* of protocols to advertise.. still guaranteed one roundtrip is enough?
psykose has quit [Remote host closed the connection]
<danieldg>
yes, because you send one "global list request" and then one "sync" request, so the reply is "all globals" then "callback done"
psykose has joined #wayland
<soreau>
oh, so there is a done concept
<danieldg>
that's how sync works
<danieldg>
if you don't ask for a sync after asking for globals you don't know when it's done. But everyone does that.
<soreau>
danieldg: everyone does what?
<soreau>
sync or not?
<danieldg>
send get_regitery and sync as the first two commands
<danieldg>
look at WAYLAND_DEBUG=1 output from any client
<soreau>
while debug does show sync calls, I don't see wl_display_sync called explicitly anywhere except in libwayland-client
<danieldg>
roundtrip is "call sync and then wait for done before returning"
<danieldg>
you could call sync yourself if you actually wanted to do things during startup (load stuff, for example)
<soreau>
ah, that's like an xcb trick :)
<danieldg>
or you can be boring and use threads like everyone else probably does
<soreau>
ok, mystery solved
<soreau>
danieldg: thanks
garnacho has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
nerdopolis has quit [Ping timeout: 480 seconds]
JayBeeFOSS has quit [Remote host closed the connection]
JayBeeFOSS has joined #wayland
caveman has quit [Remote host closed the connection]
caveman has joined #wayland
glennk has joined #wayland
AnuthaDev has joined #wayland
AnuthaDev has quit []
AnuthaDev has joined #wayland
Company has joined #wayland
bodiccea has joined #wayland
glennk has quit [Ping timeout: 480 seconds]
kts has joined #wayland
kts has quit [Ping timeout: 480 seconds]
rv1sr has joined #wayland
privacy has quit [Quit: Leaving]
garnacho has joined #wayland
junaid has joined #wayland
narodnik2 has joined #wayland
kts has joined #wayland
DodoGTA has quit [Quit: DodoGTA]
DodoGTA has joined #wayland
AnuthaDev has quit [Ping timeout: 480 seconds]
neniagh has quit []
neniagh has joined #wayland
neniagh has quit []
anarsoul has joined #wayland
anarsoul|2 has quit [Read error: Connection reset by peer]
neniagh has joined #wayland
kts has quit [Ping timeout: 480 seconds]
glennk has joined #wayland
junaid has quit [Remote host closed the connection]