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
CodeSpelunker has quit [Quit: CodeSpelunker]
columbarius has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
c7s has quit [Ping timeout: 480 seconds]
Moprius has quit [Quit: Konversation terminated!]
Lucretia has quit []
Lucretia has joined #wayland
Company has quit [Quit: Leaving]
zebrag has quit [Quit: Konversation terminated!]
eroc1990 has quit [Quit: The Lounge - https://thelounge.chat]
rv1sr has joined #wayland
eroc1990 has joined #wayland
tzimmermann has joined #wayland
bittin has quit [Read error: Network is unreachable]
bittin has joined #wayland
jgrulich has joined #wayland
dcz_ has joined #wayland
danvet has joined #wayland
sychill has joined #wayland
sych1ll has quit [Ping timeout: 480 seconds]
Dami-star has joined #wayland
Dami_Lu has quit [Read error: Connection reset by peer]
erle- has joined #wayland
hardening has joined #wayland
rgallaispou has joined #wayland
eroux has quit [Read error: No route to host]
hardening_ has joined #wayland
eroux has joined #wayland
mvlad has joined #wayland
hardening has quit [Ping timeout: 480 seconds]
eroux has quit [Quit: Textual IRC Client: www.textualapp.com]
eroux has joined #wayland
rasterman has joined #wayland
hill has joined #wayland
manuel1985 has joined #wayland
MajorBiscuit has joined #wayland
erle- has quit []
erle- has joined #wayland
cool110 has quit [Remote host closed the connection]
cool110 has joined #wayland
cool110 has quit [Remote host closed the connection]
<mort_> does anyone know if weston implements stuff like window hiding and positioning? With a simple SDL application, nothing I do affects the positioning of the window and hiding the window doesn't work, but I don't know if that's SDL's fault or weston's
cool110 has joined #wayland
<mort_> not even setting the window size has any effect
<mvlad> mort_, w/ desktop-shell specific positioning won't be possible. desktop-shell will react to set_minimize, but I don't believe there's something to bring it back, so if you minimize it be like that forever. Maximization/fullscreen should work fine. Applications can set their own size, so I suppose that's a SDL issue, if you can't set a specific size.
<mort_> How about hiding windows?
<mvlad> s/hiding/minimize.
<mort_> no, hiding
<mort_> at least on other systems (macOS, Windows, X11), hiding a window is a different operation from minimizing
jmabr has joined #wayland
<pq> mort_, Wayland xdg-shell extension for xdg_toplevel says "Attaching a null buffer to a toplevel unmaps the surface." so that's the way to hide, I think.
<pq> does SDL do that, I don't know
<pq> mort_, explicit positioning is deliberately not supported on desktop Wayland systems.
<pq> setting the window size should work fine as long as it's not fullscreen or maximized, so that sounds like something in SDL or your app.
<pq> would need to inspect a Wayland protocol log to rule out bugs in Weston
<pq> WAYLAND_DEBUG=1 ./my_app
<kennylevinsen> (Note that unmap is different from “hiding” in that the compositor cannot unhide: the window is gone until it is remapped.)
<mort_> oh, that's useful. According to that, SDL_HideWindow() does literally nothing, SDL_ShowWindow() does xdg_toplevel@25.unset_fullscreen(). SDL_MinimizeWindow() and SDL_RestoreWindow() both also do literally nothing
<mort_> wish it'd just have printed a "this isn't supported with the wayland driver yet" message
<pq> kennylevinsen, we have unmap and minimize. Is there a case for "hide" that is neither?
<davidre> iirc Qt just destroys the surface on "hide"
<pq> yeah, given the xdg-shell spec, there seems to be little difference between destroying and attaching a null buffer.
<pq> and I think some earlier version of the spec used to forbid attaching null
co1umbarius has joined #wayland
<pq> my question would be, how to hide without losing the window position
<pq> or is maintaining that at the compositor's discretion
columbarius has quit [Ping timeout: 480 seconds]
<jadahl> there is no way to reliably restore a window position when it's remapped (shown after being hidden)
<jadahl> that's within scope for the xdg_session_manager thingy though
<pq> ok, so that's the reason to not have a "hide" that would be less destructive than unmap
<wlb> weston/main: Marius Vlad * desktop-shell: Handle weston_curtain destruction https://gitlab.freedesktop.org/wayland/weston/commit/2327daf96b34 desktop-shell/shell.c
<wlb> weston Merge request !859 merged \o/ (desktop-shell: Roll our own loop for weston_curtain destruction https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/859)
MajorBiscuit has quit [Remote host closed the connection]
MajorBiscuit has joined #wayland
adia has quit [Quit: The Lounge - https://thelounge.chat]
adia has joined #wayland
jmdaemon has quit [Ping timeout: 480 seconds]
<wlb> wayland-protocols Merge request !149 opened by () wp-fractional-scale-v1: alternative fractional scaling support by changing coordinate spaces https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/149
fmuellner has joined #wayland
rasterman- has joined #wayland
rasterman has quit [Read error: No route to host]
dblsaiko has quit [Remote host closed the connection]
dblsaiko has joined #wayland
<mort_> I upgraded SDL to the newest version, and now SDL_ShowWindow and SDL_HideWindow does *something*...
columbarius has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
<pq> mort_, looks like SDL doesn't implement the xdg-shell top-level mapping sequence quite right.
<pq> what I'm surprised about is that why does the first re-show operation not fail already
<pq> luck, I guess
<pq> there might be something strange in Weston too. I'm not quite sure why the second re-show fails at that point.
<pq> or maybe it's the spurious attach(null)+commit
<pq> would need a deeper look
<mort_> I wish Wayland was more ready
<daniels> have you filed a bug against SDL?
<mort_> I didn't know about this bug until just now, and I don't know that it's in SDL rather than weston
<mort_> they'll just ask me to try with the latest sdl version and I don't think I have the patience to do that right now, I'll just try to work around this
<pq> SDL is definitely not doing everything right there
<mort_> hiding the window doesn't even work
<mort_> it's not just that the second showwindow doesn't work
<pq> not hiding may be a weston bug
MajorBiscuit has quit [Ping timeout: 480 seconds]
<pq> SDL is not listening for the configure events it must listed for when mapping a top-level
<mort_> maybe I should just go back to X
<pq> *listen for
devilhorns has joined #wayland
<pq> mort_, anyway, nothing will get better, if there are no open bug reports about these. IRC does not count.
flacks has quit [Quit: Quitter]
MajorBiscuit has joined #wayland
<mort_> ik
flacks has joined #wayland
<wlb> weston Merge request !866 opened by () gl-renderer: improve GL ES and EGL feature logging https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/866 [GL renderer]
rasterman- has quit [Read error: No route to host]
<pq> mort_, thanks!
anarsoul|2 has quit [Ping timeout: 480 seconds]
anarsoul has joined #wayland
<mort_> I wish wayland was just production ready though
<mort_> the compositors are probably largely solid but the ecosystem is... not
<pq> mort_, I'm not sure it's ok to use sleep() like that, do you not need to SDL_PollEvent() in the mean time to let SDL react to Wayland events?
rasterman has joined #wayland
eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pq> or maybe SDL uses a background thread to handle Wayland?
<pq> mort_, also seeing that you use Mali, are you also using a Mali-hacked-up version of Weston?
rasterman has quit []
<mort_> afaik you should be able to do whatever you want with your application's main thread with SDL, and the PollEvent mechanism is only to deliver events from SDL to your application
rasterman has joined #wayland
<pq> alright
<mort_> just in case though I tried to replace the sleep with SDL_Delay (which *has* to be okay, right?) and I even tried inserting the pollevent loop inbetween every SDL call
<mort_> didn't change anything
<pq> ok
<mort_> we are indeed using a mali hacked-up version of weston
<pq> I wonder if the Mali-hacks somehow break HideWindow... always easy to blame foreign code
caveman has joined #wayland
<mort_> I don't even understand why there has to be anything mali-specific in weston
eroux has joined #wayland
al has quit [Ping timeout: 480 seconds]
al has joined #wayland
<kennylevinsen> I wish SDL had a proper event poll. SDL_PollEvent is a busy poll with a 1ms sleep... :(
<daniels> oh my god
<mort_> SDL_PollEvent is non-blocking isn't it?
<daniels> mort_: there doesn't have to be anything mali-specific in weston, it works perfectly well on mali out of the box
<mort_> do you mean SDL_WaitEvent
<daniels> Rockchip have hacked the bejesus out of it in order to make a bunch of their hacked-up proprietary stack (which doesn't use standard protocols or anything sensible) work
<mort_> fun
<daniels> the hacked-up NXP version is worse in terms of code quality for sure, but the things Rockchip do in that tree are absolutely astonishing
<daniels> I really admire their creativity, but it's also really horrible
<daniels> I would definitely try to use mainline things first, rather than outdated forks which have been hacked to hell and back by the vendor
<mort_> this isn't the area where I want "creativity" tbh
<daniels> no, me neither
<kennylevinsen> SDL_PollEvent and SDL_WaitEvent call SDL_WaitEventTimeout with 0 and -1 timeout respectively. This is the wait part: https://github.com/libsdl-org/SDL/blob/main/src/events/SDL_events.c#L1100
<kennylevinsen> Yeah meant waitevent (which does the job traditionally called "poll"...)
<mort_> yea..
<mort_> what SDL calls "poll event", some other things call "pull event", which I think is more reasonable
hill has quit [Remote host closed the connection]
eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mclasen has joined #wayland
<any1> SDL_Delay() just sleeps: https://github.com/libsdl-org/SDL/blob/main/src/timer/unix/SDL_systimer.c#L188-L236. One thing you can do to sleep while dispatching events is to call SDL_WaitEventTimeout(T) in a loop until T reaches 0, where T is the remainder of the timeout.
<any1> The only issue with this is that you could blow up your stack if you're not careful :)
txtsd has quit [Ping timeout: 480 seconds]
<mort_> if SDL_Delay is just a sleep, that means sleeping in the main thread is explicitly supported
Company has joined #wayland
txtsd has joined #wayland
<kennylevinsen> it's either a nanosleep or a select with a timeout but no fds (?!), but a sleep regardless
<pq> that select() thing is probably the most portable way to sleep sub-second intervals
<pq> if you care about very... exotic... systems
<mort_> SDL is from 1998
<mort_> it might've been reasonable back then to support unices without usleep or nanosleep and then it just never got removed, idk
floof58 has quit [Ping timeout: 480 seconds]
eroux has joined #wayland
maxzor has quit [Ping timeout: 480 seconds]
<mort_> does weston support alpha transparency?
<pq> mort_, you mean alpha channel in windows? Yes.
<mort_> then SDL is somehow not drawing transparency when it should
eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tleydxdy has joined #wayland
tleydxdy has quit []
lsd|2 has joined #wayland
maxzor has joined #wayland
caveman has quit [Ping timeout: 480 seconds]
lsd|2 has quit [Remote host closed the connection]
<mort_> alright, so SDL isn't gonna work with me but I need to hide a window. I have the wl_display*, wl_surface* and wl_shell_surface*. What would be the best way to hide the window without any help from SDL? I'm thinking it might be to draw transparent pixels to the surface window, but I don't know what the cleanest way to do that would be
doppo has quit [Remote host closed the connection]
<mort_> s/surface window/window surface/
rektide has quit [Remote host closed the connection]
Dami-star has quit []
Dami_Lu has joined #wayland
cvmn has quit [Remote host closed the connection]
cvmn has joined #wayland
doppo has joined #wayland
<any1> Maybe SDL is using X11?
rektide has joined #wayland
<mort_> it's not
<mort_> I don't even think this system has XWayland, and SDL_GetWindowWMInfo reports wayland
<kennylevinsen> Hmm. If you have a wl_shell_surface from sdl then you have an old version of SDL (xdg shell was added in 2018, HideWindow was implemented in 2021). A total hack would be to submit a 1px alpha buffer, but that'll give worse UX than just minimizing the window...
<mort_> minimizing doesn't work either
<mort_> submitting a 1px alpha buffer is perfectly ok, this is a system which nobody is interacting with through a keyboard/mouse
<kennylevinsen> You can use a 0 input region to avoid any input
<mort_> input isn't a concern
<mort_> https://wiki.libsdl.org/SDL_SysWMinfo this documents that wl_shell_surface exists in the newest version of SDL
<mort_> with beautifully broken formatting
<ifreund> if you're not aware, wl_shell has been deprecated for many years
<mort_> you should tell that to the sdl people
<kennylevinsen> All the wl_shell code was removed from SDL on the 27th July 2021 by bl4ckb0ne.
<kennylevinsen> Released in 2.0.16
<mort_> maybe they should've updated the docs then
<bl4ckb0ne> o7
<bl4ckb0ne> SDL reverted to X11 by default recently
<mort_> great, I'm using it with wayland
<bl4ckb0ne> SDL_VIDEODRIVER=wayland?
<bl4ckb0ne> also the SDL wiki is very much out of date
<mort_> SDL is compiled with `-DSDL_X11=OFF`
<mort_> anyways, I'm using SDL 2.0.20, so if everything xdg-shell related was removed in 2.0.16 then I don't have the xdg-shell stuff
<mort_> bl4ckb0ne: did you know that HideWindow and ShowWindow are broken under wayland?
<mort_> if you've worked on the wayland back-end you may be interested to know
<bl4ckb0ne> wl-shell got removed and replace by xdg-shell
<bl4ckb0ne> xdg-shell-v6 also got removed
rektide has quit [Remote host closed the connection]
<kennylevinsen> mort_: what release did you test with btw?
<kennylevinsen> Oh sorry
<kennylevinsen> You just wrote it lol
* kennylevinsen context switches too much
rektide has joined #wayland
<mort_> cd
<mort_> sorry, wrong window
lsd|2 has joined #wayland
lsd|2 has quit []
<mort_> https://github.com/libsdl-org/SDL/blob/main/src/video/wayland/SDL_waylandwindow.c#L1400 I don't know if this means anything, but maybe it does? "Be sure to detach after this, otherwise showwindow crashes"
<mort_> ah no, the showWindow source code starts with a "Detach any previous buffers before resetting everything" comment, so that's probably what is meant
<mort_> this is weirdly similar: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1290 -- and from IRC they were told that "wl_surface.attach MUST NOT HAPPEN BEFORE commit()", and SDL does wl_surface_attach before wl_surface_commit
<kennylevinsen> ... before the first commit when configuring the surface role.
<mort_> aha. So completely unrelated then probably
<mort_> but in SDL_ShowWindow, the xdg surface isn't configured yet, hence the crash, right
c7s has joined #wayland
floof58 has joined #wayland
tleydxdy[m] has quit []
tleydxdy[m] has joined #wayland
tleydxdy[m] has quit []
floof58 has quit [Quit: floof58]
floof58 has joined #wayland
eroux has joined #wayland
<kennylevinsen> yeah to attach a buffer, you must first have committed the role, and you must ack the configure that comes (although we allow the ack to be in the same commit as the attached buffer in wlroots - I assume that's fine). After an unmap you can reuse your role if it still exists, but you still need to commit to get a configure/ack in place.
tleydxdy has joined #wayland
<tleydxdy> Hi everyone, I was trying to run vkcube-wayland and it would segfault because my compositor doesn't have a seat/keyboard/etc so it would try to free the NULL pointer when it exits. would it be a good idea to add a null check into wl_proxy_destroy so applications don't need to check for null? similar to how normally free() works
eroux has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eroux has joined #wayland
eroux has quit []
zebrag has joined #wayland
Narrat has joined #wayland
___nick___ has joined #wayland
___nick___ has quit []
___nick___ has joined #wayland
bittin has quit [Remote host closed the connection]
MajorBiscuit has quit [Ping timeout: 480 seconds]
rgallaispou has quit [Ping timeout: 480 seconds]
jmdaemon has joined #wayland
qyliss has quit [Quit: bye]
qyliss has joined #wayland
tzimmermann has quit [Quit: Leaving]
___nick___ has quit []
___nick___ has joined #wayland
___nick___ has quit []
___nick___ has joined #wayland
devilhorns has quit []
erle- has quit []
___nick___ has quit []
___nick___ has joined #wayland
ppascher has quit [Ping timeout: 480 seconds]
fmuellner_ has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
fmuellner_ has quit [Ping timeout: 480 seconds]
maxzor has quit [Remote host closed the connection]
maxzor has joined #wayland
ppascher has joined #wayland
jgrulich has quit [Remote host closed the connection]
danvet has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
___nick___ has quit [Ping timeout: 480 seconds]
soreau has quit [Quit: Leaving]
soreau has joined #wayland
maxzor has quit []
Seirdy has joined #wayland
mvlad has quit [Remote host closed the connection]
Narrat has quit []
fmuellner has joined #wayland
mclasen has quit []
mclasen has joined #wayland
mclasen has quit []
mclasen has joined #wayland
jmabr has quit [Quit: Leaving]
hergertme has quit [Remote host closed the connection]
hergertme has joined #wayland
mclasen has quit []
mclasen has joined #wayland
rv1sr has quit []
mclasen has quit []
mclasen has joined #wayland
dcz_ has quit [Ping timeout: 480 seconds]
AJ_Z0 has quit [Quit: I have to return some videotapes]
AJ_Z0 has joined #wayland
hardening_ has quit [Ping timeout: 480 seconds]
txtsd has quit [Ping timeout: 480 seconds]
fmuellner has quit [Ping timeout: 480 seconds]
Arnavion has quit [Quit: Arnavion]
txtsd has joined #wayland
Arnavion has joined #wayland