ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
vincejv has joined #wayland
Calandracas has joined #wayland
Calandracas__ has quit [Ping timeout: 480 seconds]
danshick has quit [Read error: Connection reset by peer]
danshick has joined #wayland
bleb has quit [Ping timeout: 480 seconds]
dcz_ has joined #wayland
coldfeet has joined #wayland
tokyovigilante_ has joined #wayland
tokyovigilante has quit [Ping timeout: 480 seconds]
tokyovigilante has joined #wayland
tokyovigilante_ has quit [Ping timeout: 480 seconds]
feaneron has quit [Ping timeout: 480 seconds]
garnacho has joined #wayland
rasterman has joined #wayland
kts has joined #wayland
bleb has joined #wayland
coldfeet has quit [Ping timeout: 480 seconds]
kts has quit [Ping timeout: 480 seconds]
coldfeet has joined #wayland
MrCooper has quit [Remote host closed the connection]
MrCooper has joined #wayland
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
fmuellner has joined #wayland
kestrel7 has joined #wayland
kestrel has quit [Ping timeout: 480 seconds]
kestrel7 is now known as kestrel
kekekeks has joined #wayland
<kekekeks>
Hi. Quick question: do I understand correctly that each wl_display::get_registry establishes an "id namespace" of sorts, so if one creates a wl_surface using wl_compositor from one instance of registry, then when getting events it will always receive global object ids from the same registry?
<kekekeks>
i. e. if one writes a toolkit-agnostic lib and asks for wl_display, can it be assumed that it's lib's sole responsibility to manage wl_proxy lifetimes for objects created using its own wl_registry and the main toolkit will never see the same set of wl_proxy objects unless those were explicitly transferred?
<vyivel>
kekekeks: global object ids are shared, you'll get the same ones with each registry
<vyivel>
well, not "shared", each global just has one id not tied to any registry
<kekekeks>
So, how does libwayland-client determines which wl_proxy to use when an event arrives?
<kekekeks>
Consider the following scenario:
<kekekeks>
- A library gets loaded into a GTK-application that has bound its own listerner to global wl_output objects
<kekekeks>
- The library gets the registry and gets an id of a wl_output
<kekekeks>
- The library calls wl_output_add_listener
<vyivel>
a proxy is mirrored by a resource on the server side
<vyivel>
the compositor will send events to each resource
<kekekeks>
What will arrive as an argument to wl_surface::enter event?
<vyivel>
one wl_surface.enter for each resource iirc
<vyivel>
yes
<kekekeks>
So wl_surface would see multiple wl_output objects that represent the same output object, right?
<vyivel>
correct
<kekekeks>
So it's not safe to make _any_ kind of assumtions about the `data` argument, right?
<kekekeks>
Correction: about wl_proxy_get_user_data return value for event arguments
saumon has quit [Quit: Leaving server]
<kekekeks>
Since it's not known who is the owner of wl_proxy
<kekekeks>
So, a language binding should generally assume that it "owns" wl_proxy objects that it got from event arguments with "new_id" and ones it has created manually. To check that it "owns" an given wl_proxy it should utilize wl_proxy_get_tag
Moprius has joined #wayland
<vyivel>
sounds right yeah
coldfeet has quit [Ping timeout: 480 seconds]
Moprius has quit [Remote host closed the connection]
<kekekeks>
Since it assumes that it has a relevant GdkMonitor record that it has seen from its own registry listener
<kekekeks>
So if a 3rd party client reuses the same connection, binds to wl_registry, creates a proxy for wl_output, GTK's window->monitor association would be broken
<kekekeks>
I. e. it's not possible to query for wl_output properties without breaking GTK in some way
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
<kennylevinsen>
kekekeks: assuming you don't mean a third party *client* but just that the same gtk-using process reuses libwayland client and display connection, association wouldn't be broken for wl_output's that GTK knows, just duplicate output objects it won't know - it might just yield a NULL GdkMonitor or something
<kekekeks>
It's about code running in the same process reusing the same wl_display object
feaneron has joined #wayland
<kekekeks>
GTK doesn't seem to expect extra wl_output objects existing on the same wl_display
<kekekeks>
And it's the first event handler I've checked, there might be more instances of this
<kekekeks>
Is multiple libraries or event toolkits utilizing the same connection a supported scenario wayland/libwayland-client were designed for or is that just something that happens to sometimes work fine?
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
<kekekeks>
*event
<kekekeks>
*even
<kennylevinsen>
a Wayland display connection is not meant to be shared in a arbitrary and uncoordinated fashion, but some coordinated sharing is possible - in your case if GTK is upset, consider filing an issue/sending a patch to ignore unknown wl_outputs
<kennylevinsen>
I personally see it as a bit of a hack whenever a display connection ends up having more than one wl_registry instance, a result of lack of cooperation between the display owner and whatever is trying to extend some functionality
avu has quit [Quit: avu]
avu has joined #wayland
kekekeks has quit [Ping timeout: 480 seconds]
kts has joined #wayland
vincejv has quit [Remote host closed the connection]
rasterman has joined #wayland
Calandracas_ has quit [Remote host closed the connection]
Calandracas_ has joined #wayland
<dcz_>
is anyone allowed to merge experimental MRs once the waiting time completes?
feaneron has quit [Quit: feaneron]
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
kekekeks has joined #wayland
kekekeks has quit [Ping timeout: 480 seconds]
kekekeks has joined #wayland
kts has quit [Quit: Konversation terminated!]
fmuellner has quit [Ping timeout: 480 seconds]
kekekeks has quit [Ping timeout: 480 seconds]
qyliss has quit [Quit: bye]
qyliss has joined #wayland
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
fmuellner has joined #wayland
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
saumon has quit [Quit: Leaving server]
dcz_ has quit [Read error: Connection reset by peer]
dcz_ has joined #wayland
dcz_ has quit [Quit: Konversation terminated!]
Drakulix has quit [Ping timeout: 480 seconds]
dcz_ has joined #wayland
dcz_ has quit []
Drakulix has joined #wayland
saumon has joined #wayland
narodnik2 has quit [Ping timeout: 480 seconds]
akimoto has joined #wayland
karenw has joined #wayland
Nosrep has joined #wayland
akimoto has quit [Remote host closed the connection]