ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
shoragan has quit []
shoragan has joined #wayland
shoragan has quit [Read error: Network is unreachable]
runxiyu has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
runxiyu has joined #wayland
coldfeet has quit [Remote host closed the connection]
coldfeet has joined #wayland
Moprius has joined #wayland
fmuellner has joined #wayland
balrog has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
sima has joined #wayland
<riteo>
TIL, looking from yesterday's discussion, that events with global arguments (e.g. wl_surface::enter) get resent for each instance of the same underlying resource
nerdopolis has joined #wayland
<riteo>
I'm curious, is this a libwayland thing or does the compositor need to do that themselves?
kts has joined #wayland
<vyivel>
the latter
iomari891 has joined #wayland
naveenk2 has joined #wayland
<riteo>
I see
Nosrep has joined #wayland
<riteo>
thank you for clarifying!
kts has quit [Ping timeout: 480 seconds]
vincejv has quit [Ping timeout: 480 seconds]
naveenk2 has quit [Ping timeout: 480 seconds]
naveenk2 has joined #wayland
zvarde1988303206779191685873 has joined #wayland
vincejv has joined #wayland
Tom^ has quit [Remote host closed the connection]
iomari892 has joined #wayland
iomari891 has quit [Read error: Connection reset by peer]
rasterman has joined #wayland
iomari892 has quit [Ping timeout: 480 seconds]
balrog has joined #wayland
iomari891 has joined #wayland
Tom^ has joined #wayland
crombie has joined #wayland
Nosrep has quit [Ping timeout: 480 seconds]
naveenk2 has quit [Quit: Leaving.]
rasterman has quit [Quit: Gettin' stinky!]
crombie has quit [Ping timeout: 480 seconds]
coldfeet has quit [Quit: Lost terminal]
ramblurr has quit [Remote host closed the connection]
Brainium has joined #wayland
Drakulix has quit [Ping timeout: 480 seconds]
Moprius has quit []
Drakulix has joined #wayland
dcz_ has quit [Quit: Konversation terminated!]
dcz_ has joined #wayland
dcz_ has quit []
rasterman has joined #wayland
crazybyte4 has joined #wayland
crazybyte4 has quit []
sima has quit [Ping timeout: 480 seconds]
iomari891 has quit [Remote host closed the connection]
<kekekeks>
So any lib that creates wl_surface instances on the same connection as GTK is essentially disallowed to attach user data to its wl_surface objects
<kekekeks>
And that's not GTK's fault
<kekekeks>
Because, how else it would be supposed to differentiate its surfaces when handling events from wl_data_device
<kekekeks>
I suppose one could provide a user data struct with first 8 bytes set to zero
<kekekeks>
Which would avoid crashes in GTK
<kekekeks>
But it's something that seems to be broken by design on either protocol level or on client library level
<kennylevinsen>
I'm not sure I follow, early escape just mean ignored object, no? also, GTK shouldn't really be confronted with such foreign surface, as it has no listeners on it (and unlike wl_output, it shouldn't be a surprise argument either)
<kekekeks>
GTK listens on wl_data_device and wl_touch interfaces
<kekekeks>
Those interfaces receive events for *all* wl_surface instances created by the same connection
<kennylevinsen>
aaah, that's the point of concern
<kennylevinsen>
fair, but again: early escape ignoring a surface gtk doesn't own seems fine
<kennylevinsen>
then either: 1. this is a GTK bug (the existing check suggests this was intended - maybe blame will till), or 2. GTK does not support sharing it's connection with something creating additional surfaces and require that the surfaces are made through GTK (Firefox unfortunately is known to create its own surfaces under GTK, but their code is a bit hairy to study/work with)
<kekekeks>
From API design point of view I'd consider this to be wayland/libwayland-client problem, no other API for interacting with system's display server requires one to put special effort for "connection sharing" on every interaction
<kennylevinsen>
either fits with what I previously said: coordinated sharing is possible, i.e. GTK as the owner of the display connection ultimately decides the rules for using its connection
<kennylevinsen>
I wouldn't consider the issue to be a user data problem as much as just an unknown resource problem
<kennylevinsen>
they could have used a hashmap of resources and freaked out on unknown resource, and the issue would be the same
<kekekeks>
If this was considered during design, a slot-like system like with TLS could have been a thing
<kennylevinsen>
that wouldn't solve unknown resources in general, and even if there was a slot that was used GTK could decide to assert on the presence of their value
<kekekeks>
Anyway, the thing I'm trying to do seems to be not possible to implement
iomari891 has quit [Remote host closed the connection]
iomari891 has joined #wayland
<kennylevinsen>
if the other toolkit can render a buffer and get input fed in it could work without sharing a connection
<kennylevinsen>
embedding a surface using a different "toolkit" directly using the connection would probably require specific support from it...
<kekekeks>
popups will be a problem
<kennylevinsen>
but some of your observations might be worth noting somewhere, either for discussion or for documentation should others try to go that path
<kekekeks>
since those need to be triggered from the same connection as the original window
<kennylevinsen>
if the toolkit can render to a buffer it might also be able to ask for a popup window type, which the glue would then provide
<kekekeks>
that would essentially require a gtk-based "backend" implementation
<kekekeks>
since all of the input, dnd, etc, etc would need to go through GTK
<kekekeks>
keyboard and IME is already a problem since wl_subsurface can't have keyboard focus
<kennylevinsen>
it would require the nested toolkit to be able to just provide buffers and ask for e.g. particular surface types, while the embedder would create those however it likes and send the input it receives for them along
<kennylevinsen>
if the main app is GTK, then yes it would be using GTK for that
iomari891 has quit [Remote host closed the connection]
<kekekeks>
GTK has a rather peculiar way of doing GPU-based drawing
<kekekeks>
it wants a separate OpenGL context per GdkWindow
iomari891 has joined #wayland
<kekekeks>
so buffer sharing will be tricky too
<kekekeks>
Plus there can potentially be problems with pixel formats
<kekekeks>
if one would want to e.g. present yuv content
<kennylevinsen>
I'm no GTK expert, but buffers can be shared and imported for e.g. texturing. GTK does not allow you to take ownership of rendering of a surface, hence Firefox's somewhat wonky integration
<kennylevinsen>
might be worth noting down the issues as others might hit them if trying to share a connection for other reasons, but yeah if the target is GTK then "not possible at the current time" seems like a sound conclusion - some of the GTK people in here might have some specific commentary
karenw has joined #wayland
<kekekeks>
I'll file an issue against GTK4, we kinda have to target GTK3
<kekekeks>
Mkay, if there is no wl_surface associated user-data (nullptr) it later results in a bunch of scary error messages are g_object_ref and gdk_window_get_root_coords complain about the thing not being a window, but it doesn't seem to have a broader effect
<kekekeks>
I'd presume that event "duplication" works in the same way for `tablet-v2` interface and having multiple copies of `zwp_tablet_v2` would trigger a tool proximity event for each of those, right?
<kekekeks>
I guess one could write an LD_PRELOAD-wrapper for libwayland and "isolate" GTK from events with tag-less objects
<kekekeks>
So it would only see wl_proxy objects that it either bound to via constructors or by receiving as new_id
fmuellner has quit [Ping timeout: 480 seconds]
kekekeks has quit [Ping timeout: 480 seconds]
alatiera has joined #wayland
andymandias has quit [Remote host closed the connection]