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]
Calandracas_ has joined #wayland
Calandracas has quit [Ping timeout: 480 seconds]
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
karenw has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Ping timeout: 480 seconds]
Brainium has quit []
Moprius has quit []
Drakulix_ has joined #wayland
Drakulix has quit [Ping timeout: 480 seconds]
Drakulix_ is now known as Drakulix
glennk has joined #wayland
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> Mkay, so connection sharing isn't really supported
<kekekeks> Since e. g. GTK relies on set_user_data for global objects right now
<vyivel> you can store user data externally in a hashmap or smth
<kekekeks> _I_ certainly can
<vyivel> there's also wl_proxy_set_tag() which i just remembered about
<vyivel> so you can tag a proxy and then check if it belongs to you or some other part of the program
<kekekeks> How new_id identifiers are handled if there are multiple proxies?
<kekekeks> E. g. if one binds to zwp_tablet_manager_v2's events and receives tablet_added event
<kekekeks> Will each proxy bound to zwp_tablet_manager_v2 receive its own zwp_tablet_v2 identifier?
<vyivel> yes
<vyivel> you write a small program that does something like that and check events with WAYLAND_DEBUG
<kekekeks> So what GTK does here (https://github.com/GNOME/gtk/blob/d78d8dafffab7eafc3de7f31c4ee0781be0b0656/gdk/wayland/gdkseat-wayland.c#L3789-L3806) is safe and one can create their own zwp_tablet_manager_v2 binding and listeners
<vyivel> i believe so
saumon has joined #wayland
<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> So, for GTK handling wl_surface::enter this way (https://github.com/GNOME/gtk/blob/d78d8dafffab7eafc3de7f31c4ee0781be0b0656/gdk/wayland/gdksurface-wayland.c#L830-L834) is an incorrect libwayland-client usage, right?
nerdopolis has joined #wayland
<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]
rasterman has joined #wayland
Brainium has joined #wayland
Consolatis_ has joined #wayland
Consolatis is now known as Guest16176
Consolatis_ is now known as Consolatis
Guest16176 has quit [Ping timeout: 480 seconds]
fmuellner has quit [Ping timeout: 480 seconds]
glennk has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]