ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput | register your nick to speak
manuel_ has joined #wayland
manuel__ has quit [Read error: Connection reset by peer]
ybogdano is now known as Guest6422
ybogdano has joined #wayland
ybogdano has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
fmuellner has quit [Ping timeout: 480 seconds]
molinari has quit [Ping timeout: 480 seconds]
ybogdano has joined #wayland
ybogdano has quit [Ping timeout: 480 seconds]
julio7359 has joined #wayland
julio7359 has quit [Remote host closed the connection]
julio7359 has joined #wayland
julio7359 has quit [Ping timeout: 480 seconds]
julio7359 has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold___ has joined #wayland
CodeSpelunker has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
Company has quit [Quit: Leaving]
julio7359 has quit [Remote host closed the connection]
julio7359 has joined #wayland
Leopold___ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold___ has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
agd5f has joined #wayland
agd5f_ has quit [Ping timeout: 480 seconds]
julio7359 has quit [Remote host closed the connection]
julio7359 has joined #wayland
CodeSpelunker has quit [Quit: CodeSpelunker]
julio7359 has quit [Ping timeout: 480 seconds]
julio7359 has joined #wayland
julio7359 has quit [Ping timeout: 480 seconds]
dcz_ has joined #wayland
hardening has joined #wayland
molinari has joined #wayland
systwi has quit [Ping timeout: 480 seconds]
kts has joined #wayland
mvlad has joined #wayland
zvarde1988303206779 has joined #wayland
systwi has joined #wayland
zvarde198830320677 has quit [Ping timeout: 480 seconds]
eroux has joined #wayland
<wlb> weston/main: Philipp Zabel * pixman-renderer: hold a reference for renderbuffers on the output state list https://gitlab.freedesktop.org/wayland/weston/commit/07734a2564c1 libweston/pixman-renderer.c
<wlb> weston Merge request !1133 merged \o/ (pixman-renderer: hold a reference for renderbuffers on the output renderbuffer list https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1133)
Emantor_ has left #wayland [#wayland]
Emantor has joined #wayland
pochu has joined #wayland
tzimmermann has joined #wayland
eroc1990 has quit [Quit: The Lounge - https://thelounge.chat]
<wlb> weston Merge request !870 closed (compositor: Preserve content from early-destroyed SHM buffers)
<wlb> weston Merge request !736 merged \o/ (Multi-GPU support https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/736)
eroc1990 has joined #wayland
<wlb> weston/main: Derek Foreman * xwm: Init window link after removing it https://gitlab.freedesktop.org/wayland/weston/commit/8e1d7fe4da7d xwayland/window-manager.c
<wlb> weston/main: Derek Foreman * xwm: Add support for xwayland_shell_v1 https://gitlab.freedesktop.org/wayland/weston/commit/87881e2cf621 protocol/meson.build shared/xcb-xwayland.c shared/xcb-xwayland.h xwayland/meson.build xwayland/window-manager.c xwayland/xwayland.h
<wlb> weston Merge request !1037 merged \o/ (Add support for xwayland_shell_v1 https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1037)
rasterman has joined #wayland
<wlb> weston/main: Marius Vlad * xcb-client-helper: Add a XCB client helper for tests https://gitlab.freedesktop.org/wayland/weston/commit/640a3c7165dd tests/xcb-client-helper.c tests/xcb-client-helper.h .gitlab-ci.yml .gitlab-ci/debian-install.sh tests/meson.build tests/xwayland-test.c
<wlb> weston Merge request !946 merged \o/ (xcb-client-helper: Add a XCB client helper for tests https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/946)
danvet has joined #wayland
MajorBiscuit has joined #wayland
i509vcb has quit [Quit: Connection closed for inactivity]
mort_ has quit [Quit: Ping timeout (120 seconds)]
mort_ has joined #wayland
Leopold___ has quit []
kts has quit [Quit: Konversation terminated!]
Leopold has joined #wayland
<wlb> wayland Issue #363 opened by Pekka Paalanen (pq) Dream: Backward compatible clean-up of libwayland-server ABI https://gitlab.freedesktop.org/wayland/wayland/-/issues/363 [IPC library], [Scanner], [wl_shm]
rv1sr has joined #wayland
<emersion> thanks for the write-up pq!
Guest6422 has quit [Ping timeout: 480 seconds]
<emersion> i largely agree with all of that
<emersion> (well except for the part about rust but that's a given at this point lol)
<emersion> ofourdan: would there be a way to reparent only windows which are using xshape?
<emersion> tbh i don't know much about reparenting, what changes does it make?
<ofourdan> that's a good question - do tell that a client is using xshape, one would have to check if the client has set the shape extends, but a client would probably not do that if the xserver does not support shape...
<ofourdan> s/do/to/
<ofourdan> ah wait
<ofourdan> context switch error on my side
<ofourdan> that would be w/out diableing the shape extension i nthexserver, so yeah, the client could use xshape and the x11 wm can then check whether the client has set any shape extents
<pq> emersion, glad to agree for once. :-)
<ofourdan> wrt to reparenting, it's just reparenting the shaped window into a wm's own (unshaped) x11 window, so that the wayland compositor does not have to translate the shape into opaque regions.
<emersion> ofourdan: can the XWM get an event when xshape is enabled/disabled?
<emersion> hm
<ofourdan> it does nto get an event, it queries the window using e.g. XShapeQueryExtents()
<ofourdan> wait maybe there is an event as well
<emersion> right but what happens if the client changes the shape while mapped?
<emersion> hm i guess there's an event for X11 compositors anyways
<ofourdan> yeah
<ofourdan> I do nto remember which one though
<emersion> the shaped windows can be used by O-R windows, can reparenting still happen there?
<ofourdan> yeah, ShapeNotify
<emersion> cool
<ofourdan> sure, you can reparent O-R as well
hardening_ has joined #wayland
<emersion> (because O-R is not supposed to be touched by the XWM in theory AFAIU)
<emersion> ok
<ofourdan> iirc, you would also need to select SubstructureNotifyMask and SubstructureRedirectMask on the wm parent window
<ofourdan> but I do not think that would be a huge chnage
<ofourdan> maybe it;s not worth it - for xeyes, I think it;s a bug in xeyes :)
<pq> If O-R is reparented, does that actually work? Wouldn't the X11 client be wanting to position that O-R window in global coordinates, but now it gets clipped to WM installed parent window?
<pq> Would the WM need to play catch-up the parent window position/size with the O-R window position/size?
hardening has quit [Ping timeout: 480 seconds]
<ofourdan> mny x11 wm use reperenating even on O-R windows
<ofourdan> *reparenting
<pq> oh, alright
MrCooper_ is now known as MrCooper
<MrCooper> ofourdan: what is a bug in xeyes?
<ofourdan> iirc the x11 wm would not get the configureRequest for O-R window, only configureNotify
<ofourdan> MrCooper: it does not clear/repaint the shaped areas when xshape is not available from the xserver
<MrCooper> ah
<MrCooper> maybe somebody should add support for xeyes to use an RGBA visual instead of a shape for output (probably still want to use shape for input though)
<ofourdan> yeah, ala cairo-clock :)
kts has joined #wayland
<MrCooper> yeah, that's a classic
kts has quit [Quit: Konversation terminated!]
MrCooper has quit [Quit: Leaving]
MrCooper has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
Leopold has quit []
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
kts has joined #wayland
Fxzxmic has joined #wayland
Company has joined #wayland
parazyd1 has joined #wayland
<ifreund> I wish there was some meaningful way WAYLAND_DEBUG could show array contents...
<ifreund> (I'm well aware that it can't really, just wanted to complain a bit)
<jadahl> ifreund: you and me both
<ifreund> I suppose we could add an optional element size attrible to the xml for array arguments
<ifreund> and an optional enum attribute
<ifreund> I'd certainly use those in my wayland scanner too if available to generate more type-safe code
parazyd has quit [Ping timeout: 480 seconds]
<pq> what about int/unsigned/float?
<pq> int/unsigned/float/enum/other + element size (0 for variable element size) could be doable
<pq> assume CPU-endian, and forbid non-power-of-two sizes in bytes for everything except 'other'
<ifreund> pq: I'd stick to the types already used by the protocol I think...
<ifreund> <arg name="states" type="array" element-type="uint" enum="state"/>
<pq> IIRC I do use arrays to carry float, because that's the only way to carry literal floats
<ifreund> yeah, but why weren't they just made a first class type in the protocol?
<pq> and that's the only type you could not have, that is not in the protocol already
<pq> because not all ARM CPUs had FP support back then, or something like that
kts has quit [Quit: Konversation terminated!]
<ifreund> I see, so when we started writing protocols that used floats we decided to just stuff them in an array rather than adding proper support
<pq> we could add 'float' type to the protocol even today, just not 'double' nor 64-bit
<ifreund> what uses floats currently?
<pq> not even that: just encode as integers
<pq> weston's private touchscreen calibration extension
MrCooper has quit [Remote host closed the connection]
<ifreund> ah
<ifreund> looks like linux-dmabuf has the most exotic array usage I can find in wayland-protocols
MrCooper has joined #wayland
<ifreund> 32 bit int + 4 bytes padding + 64 bit int
<pq> array is essentially just a blob
<pq> it's caller array only because of wl_array
<JEEB> :D
<ifreund> yeah...
<pq> and the difference to string is... umm...
<ifreund> strings are 0 terminated right?
<ifreund> for an unknown reason because they also have a specified length
Leopold_ has quit []
<pq> yeah
<ifreund> they're also nullable, I think that's probably why they're 0-terminated on the wire
nerdopolis has joined #wayland
<ifreund> :q
<pq> I'm not sure empty vs. null is meaningful difference, but it's there.
Leopold has joined #wayland
<emersion> there was some discussion in https://patchwork.freedesktop.org/patch/166063/
<pq> oh, decimal vs. hex
<emersion> ifreund: linux-dmabuf only stores int64_t indexes in wl_array
<emersion> the shm FD contains the structured data
<emersion> err, int16_t
<ifreund> ah, I read too quickly
<pq> how do we get the printing hint from XML into libwayland?
<pq> more magic into message signature strings? I'm not sure if they stretch even further.
Fxzx_mic has joined #wayland
<ifreund> I think that's the only real option
Leopold has quit [Remote host closed the connection]
kasper93 has joined #wayland
<pq> or extend the language binding ABI with a new marshalling function... oh but that works only for sending
<ifreund> I wouldn't need any libwayland changes to make use of new xml attributes for type safety in my scanner
<pq> I know.
<ifreund> the only concern here wrt libwayland changes is pretty-printing as far as I see
<pq> yes
Fxzxmic has quit [Ping timeout: 480 seconds]
kts has joined #wayland
<ifreund> I think something like a[i] or a[u] would be fine for the type, getting the enum hint to the printer that way seems too ugly though
<pq> and verify in the scanner that the annotations are valid
<ifreund> yeah, that too
<ifreund> maybe pretty printing enum names is too ambitious for libwayland, printing the values of the array would already be a huge help
Leopold has joined #wayland
<pq> oh, nothing is generating enum value name tables for now
<pq> yes
<jadahl> maybe we can start putting that in the protocol code file exposing it via a _to_string() API
<jadahl> could be useful in its own
<pq> I've been dreaming of new Wayland bindings for C to ditch libffi, which means a new scanner, so we could even generate enum argument types if that's a good idea.
<pq> jadahl, how do you get libwayland to call that?
<ifreund> I'll put together a patch adding the xml annotations and printing values for int/uint.
<pq> oh well, simply printing just 32-bit words could help a lot.
<ifreund> I think that's pretty tightly scoped but would still be a meaningful improvement
<jadahl> pq: we'd need to reference it from the interface some how
<emersion> pq, do you know why we use libffi?
<pq> jadahl, yeah, how? I don't think the structs are versioned in any way. :-)
<jadahl> pq: I wouldn't be able to answer that without trying. my brain is not up to date about all those details
<pq> emersion, I guess because it was a practical way to have the interface handler functions called with the right arguments and type safety, and not generating dispatcher code with scanner.
<pq> emersion, the API use by all other lang bindings came much much later.
<pq> emersion, many odd details in libwayland are probably because they were "cool tricks", like wl_fixed_to/from_double.
<ifreund> what would the alternative look like in C? In zig I use compile-time metaprogramming to handle the dispatching and make it type safe
<ifreund> would a C version using the non-ffi API generate a separate C dispatcher function for each protocol?
<ifreund> s/protocol/interface/
<pq> ifreund, we'd do the equivalent in C, too. Generate a dispatcher function for each message that unwraps the arguments to call a properly typed function pointer.
<pq> When we have a build-time code generator and the signatures are fixed at build-time, there is no real need for libffi.
<emersion> yeah
* emersion pretty wary of "cool tricks"
<ifreund> yeah makes sense
<ifreund> I generate a tagged union for the message types and this function reflects on that generated tagged union type to do marshaling
<ifreund> might be able to make it a bit cleaner, been a while since I've looked at it
<emersion> i must say, comptime looked like a good way to do generics but i'm a bit disappointed that it's basically copy-paste
<emersion> ie, i can write non-sensical code with comptime, and the non-sense only gets found out when a particular comptime call triggers it
<emersion> sorry, this is off-topic
<emersion> (so when do we rewrite libwayland in zig :P )
<ifreund> once zig is stable :P
<emersion> "you can't rush art"
<ifreund> emersion: since comptime is also how zig does conditional compilation, the compiler needs to be lazy in at least some cases. That said, there are likely cases where we can make it less lazy than it is now without breaking things
<emersion> hm, what i meant was that it
<emersion> 'd be nicer if the type constraints were clearly defined for a given comptime function
<ifreund> yeah, I totally get that complaint. I think that road leads to haskell/ML style type classes though
<emersion> which is clearly a trade-off, because type constraints make stuff more complicated as well
<ifreund> and I'm not sure if that's the right road for zig to take
<emersion> i was thinking rust but sure :P
<emersion> yeah, it's a choice
<ifreund> just gotta pick the right language for the job, I've found Zig to be fantastic for writing wayland compositor code :)
<emersion> or so i've heard :)
Leopold has quit [Ping timeout: 480 seconds]
Leopold_ has joined #wayland
Fxzxmic has joined #wayland
Fxzx_mic has quit [Ping timeout: 480 seconds]
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
pochu has quit []
Leopold_ has quit [Remote host closed the connection]
kts has quit [Quit: Konversation terminated!]
Moprius has joined #wayland
Leopold_ has joined #wayland
Moprius has quit [Read error: Connection reset by peer]
Moprius has joined #wayland
kts has joined #wayland
Moprius has quit [Quit: bye]
Fxzxmic has quit [Quit: Konversation exit!]
Leopold_ has quit []
Leopold has joined #wayland
junaid has joined #wayland
Leopold has quit [Ping timeout: 480 seconds]
jmdaemon has joined #wayland
junaid has quit [Remote host closed the connection]
jmdaemon has quit [Ping timeout: 480 seconds]
Leopold has joined #wayland
robobub has quit []
Leopold has quit [Remote host closed the connection]
Leopold_ has joined #wayland
jmdaemon has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
Leopold_ has joined #wayland
fmuellner has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
Leopold has quit [Ping timeout: 480 seconds]
* kchibisov still hopes for a future without libwayland hard dep for any real wayland client side stuff.
tzimmermann has quit [Quit: Leaving]
gspbirel56 has quit [Read error: Connection reset by peer]
gspbirel56 has joined #wayland
MajorBiscuit has quit [Quit: WeeChat 3.6]
Leopold_ has joined #wayland
nurupo has quit [Quit: nurupo.ga]
nurupo has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
molinari has quit [Ping timeout: 480 seconds]
floof58 is now known as Guest6492
floof58 has joined #wayland
Guest6492 has quit [Ping timeout: 480 seconds]
i509vcb has joined #wayland
<wlb> weston Merge request !1182 opened by Sergio Gómez (SergioGDR) Disable pointer constraint if last commit unmapped the view https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1182
Leopold_ has joined #wayland
jmdaemon has joined #wayland
mvlad has quit [Remote host closed the connection]
dcz_ has quit [Ping timeout: 480 seconds]
Narrat has joined #wayland
ybogdano has joined #wayland
keir has quit [Quit: I've gone.]
___nick___ has joined #wayland
Moprius has joined #wayland
keir has joined #wayland
Moprius has quit [Quit: bye]
astlep4 has joined #wayland
rv1sr has quit []
<yshui`> hi, i am here with a wl_buffer.release question again. i can think of 2 cases when a buffer is "no longer used by the compositor". one is when the client attached a new buffer to the surface, and this new state become the current state through a series of wl_surface.commit; the other is when the compositor has made a copy of the content of the buffer, and thus no longer needs to access the buffer.
<yshui`> I assume the compositor will send wl_buffer.release in both cases?
<yshui`> another question is, is a released buffer is detached from all surfaces, then attached to a surface again, would it receive a release event again in the future?
<bl4ckb0ne> yes
kts has quit [Quit: Konversation terminated!]
<bl4ckb0ne> when the surface is committed
<bl4ckb0ne> about the first case iirc its a client error to attach two buffers to a surface before committing because only the last one will get a release event but ill have to check
<soreau> you could probably check with WAYLAND_DEBUG to get a picture of what $compositor actually does
<yshui`> > attach two buffers to a surface before committing
<yshui`> I don't think that's what i described?
<yshui`> soreau: i am more concerned with what the spec think should happen.
<bl4ckb0ne> ah yes sorry, missread there
jmdaemon has quit [Ping timeout: 480 seconds]
___nick___ has quit [Remote host closed the connection]
___nick___ has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
___nick___ has quit []
___nick___ has joined #wayland
___nick___ has quit []
___nick___ has joined #wayland
Szadek has quit [Ping timeout: 480 seconds]
Szadek has joined #wayland
jmdaemon has joined #wayland
<yshui`> yeah i think the spec agrees with what i said (so yes to both questions), but i am not very confident with my reading.
<bl4ckb0ne> from your client?
Szadek has quit [Ping timeout: 480 seconds]
Moprius has joined #wayland
Szadek has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
<ifreund> [1516900.551] wl_keyboard@20.enter(220677, wl_surface@3, array[22,29,42])
<ifreund> that's something :)
ybogdano has quit [Ping timeout: 480 seconds]
<wlb> wayland Merge request !300 opened by Isaac Freund (ifreund) scanner: allow element-type and enum on array args https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/300
<wlb> wayland Merge request !301 opened by Isaac Freund (ifreund) Draft: scanner: allow element-type and enum on array args https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/301
ybogdano has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
molinari has joined #wayland
hardening_ has quit [Ping timeout: 480 seconds]