ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
columbarius has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
jtbx has quit [Remote host closed the connection]
Brainium has joined #wayland
privacy has quit [Remote host closed the connection]
fmuellner has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
nerdopolis has quit [Ping timeout: 480 seconds]
glennk has joined #wayland
jtbx has joined #wayland
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #wayland
cool110 has joined #wayland
cool110 is now known as Guest3537
Guest3526 has quit [Ping timeout: 480 seconds]
Guest3537 has quit [Remote host closed the connection]
Guest3538 has quit [Remote host closed the connection]
cool110 has joined #wayland
cool110 is now known as Guest3544
Allak has joined #wayland
Allak has quit [autokilled: This host violated network policy and has been banned. Mail support@oftc.net if you think this is in error. (2023-10-16 03:36:12)]
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #wayland
glennk has quit [Ping timeout: 480 seconds]
kts has quit [Quit: Konversation terminated!]
utsweetyfish has quit [Remote host closed the connection]
<WhyNotHugo>
When my client owns the clipboard selection and another client wants to paste I get an fd. Is it safe to change that fd to non-blocking, or could this cause problems on the other side?
luna__ has joined #wayland
privacy has joined #wayland
luna_ has quit []
<ascent12>
WhyNotHugo: It's fine to set it to nonblocking.
<ascent12>
How something reads from a pipe doesn't affect the writing side (outside of not reading the data at all)
<Company>
I'm wondering if there is any rules on what fd you can send
<WhyNotHugo>
ascent12: thanks! I think I need to study more on the subject, but I'm not sure I have good material for this specific topic.
<Company>
like, a file manager could send an fd to a regular file to dump an image paste straight into a file
<WhyNotHugo>
Company: The protocol doesn't restrict this much, and I've seen different applications send blocking and non-blocking fds.
<WhyNotHugo>
An fd that points to a regular file would mess up the selection owner, since writing to a file in non-blocking mode is still blocking :(
<WhyNotHugo>
So if a file manager does this and you paste a huge file into a network mount, then the selection owner will freeze for a while
<Company>
to be clear: I'm not aware of anyone doing it
<WhyNotHugo>
Doing so is asking for things to break.
<ascent12>
The compositor is the one opening the pipe. The spec mentions it, but I don't think it's truly a hard requirement
<Company>
but this is Linux, so somebody somewhere...
<ascent12>
But also, the compositor isn't going to do random dumb stuff to mess with clients for no reason
<Company>
ascent12: the compositor doesn't open the pipe, the app doing the request does
<ascent12>
Actually yeah, I think I'm misremembering that
<ascent12>
Not the part of the spec I'm the most familiar with
<WhyNotHugo>
Yeah, the receiving client opens the fd, see wl_data_offer::receive
<Company>
I wrote that code for GTK4
<WhyNotHugo>
The spec just says: The transfer happens through the passed file descriptor (typically created with the pipe system call).
<Company>
but I didn't think too much about it, I had to make an abstraction for X11 work
<Company>
I've argued a bunch with Nautilus devs (also about that file dropping thing), and the conclusion was that it's not worth it with the extra amount of pain you could get from trying it
daz has quit [Ping timeout: 480 seconds]
<WhyNotHugo>
Company: So Nautilus uses a pipe?
<Company>
every GTK4 app uses a pipe
<WhyNotHugo>
Good to know. Thanks for your work on that!
<Company>
GTK4 has a framework that optimizes in-app copies, so the fd usage only happens at the end of that, and because of that nobody can influence how data is transferred
<Company>
plus, only wayland uses fds, X11 uses window properties and Windows uses COM or shm, so that wouldn't be portable
rasterman has joined #wayland
utsweetyfish has quit [Remote host closed the connection]
<pq>
Riolku, in protocol designs where you would need a unique token in order to know which event matches which request it is a common design pattern to create a new object instead to deliver the event. The protocol object ID then acts as the unique token, and the protocol library takes care of allocating, tracking and freeing it correctly.
<pq>
Riolku, it also makes it easy if you decide to not want the event after all, the protocol library takes care to ignore the event for you.
neniagh_ has joined #wayland
neniagh has quit [Read error: No route to host]
DodoGTA has quit [Quit: DodoGTA]
glennk has joined #wayland
DodoGTA has joined #wayland
<pq>
vyivel, updating protocol READMEs would be nice even if they might be often forgotten. Though when someone explicitly cc's eeryone mentioned, if someone does not want to be on that list anymore, they'd notice to remove themselves.
kts has joined #wayland
kts has quit [Ping timeout: 480 seconds]
kts has joined #wayland
carlos_ has joined #wayland
kts has quit []
utsweetyfish has quit [Remote host closed the connection]
utsweetyfish has joined #wayland
kts has joined #wayland
nerdopolis has joined #wayland
mvlad has joined #wayland
d42 has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
Moprius has joined #wayland
rv1sr has joined #wayland
privacy has quit [Remote host closed the connection]
mvlad has quit [Remote host closed the connection]
opotin65 has quit []
AnuthaDev has quit []
RAOF_ has quit [Remote host closed the connection]
RAOF has joined #wayland
nagisa_ has joined #wayland
rv1sr has quit []
nagisa_ has quit []
<emersion>
pq: hm if i want to blend in linear space, i need to un-do the alpha premult before srgb decoding and then re-do it before blending?
<emersion>
kwin does that, weston seems (?) to do that, sway doesn't
<emersion>
s/sway/wlroots/
<emersion>
(cc mstoeckl)
<Company>
or you need to do srgb decoding in premultiplied space
<Company>
no idea how hard that is though, I never tried to do the math
nerdopolis has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
Guest3544 has quit [Remote host closed the connection]
cool110 has joined #wayland
cool110 is now known as Guest3646
Guest3646 has quit [Remote host closed the connection]
cool110_ has joined #wayland
cool110_ is now known as Guest3647
nerdopolis has joined #wayland
glennk has quit [Ping timeout: 480 seconds]
<DemiMarie>
I now know why (to the best of my knowledge) nobody has written a rootless Wayland compositor before: it is really hard.
<danieldg>
how do you define rootless?
<bookworm>
other than the obvious?
<DemiMarie>
In the sense of rootful vs rootless Xwayland
<DemiMarie>
There is probably a better term that I am not aware of
<bookworm>
setuid essentially
<DemiMarie>
no
<danieldg>
I'm not familiar enough with X to know how that would matter when translated to wayland compositors
<DemiMarie>
By “rootless,” I mean a nested compositor where each Wayland toplevel and popup becomes a window in the outer compositor (which might be using a different rendering protocol)
<danieldg>
oh, for nested servers; I didn't get that part
<danieldg>
waypipe seems to kinda do that, though likely not as you want
<DemiMarie>
Now imagine a nested compositor with a backend that is effectively a subset of X11
<ids1024>
Come to think of it, it is a bit suboptimal that "rootless XWayland" and "rootless X" use "rootless" to mean different things.
<DemiMarie>
It isn’t possible to implement a conformant rootless Wayland compositor with an X11 backend
<danieldg>
I wouldn't think it would be much harder than writing an X11 client that throws pixels at the device plus a wayland server that grabs them
<DemiMarie>
Other way around
<ids1024>
I guess the RDP backend of Weston (as used for Wayland support in WSL2) is a bit like that.
<DemiMarie>
no, actually you got it right
<DemiMarie>
@_oftc_danieldg:matrix.org: the hard parts are handling window resizes and Xwayland
<DemiMarie>
The real backend protocol is not X11, but rather something Qubes OS-specific; it is, however, based on X11.
<danieldg>
sure, you'd have tearing issues and maybe non-working presentaiton feedback
<DemiMarie>
Also both the X11 WM and the Wayland client think their idea of the surface size is authoritative.
<danieldg>
sure; you'll have a bad frame during resize but wayland servers can tell the client to change size too
<DemiMarie>
yeah, now I just need to figure out how to express that with wlroots
<danieldg>
'send a reconfigure' I guess. sway does something when you do 'swaymsg resize ...'
<Company>
I would expect most compositors need to do that when the output changes
<danieldg>
sure, but that produces a lot more changes than just a server-initiated resize op
co1umbarius has joined #wayland
columbarius has quit [Read error: Connection reset by peer]