I had a random thought - "what would it take to support arbitrary old screensavers in Plasma 6 again?" 🤔 So here's xscreensaver safely rendered as a background for Plasma screen locker, working on both Wayland and X11 sessions. Turned out so much simpler than I expected 😁 Just some 70 lines of pure QML and a tiny glue to launch the process.
#plasma #kde #xscreensaver #wayland #x11 #qtwayland #qml #qtquick #gnu #linux
@jwz This is Plasma specific - it's effectively making kscreenlocker outsource its background rendering to another process, which doesn't even have to be aware that it's being used as a screensaver (or a wallpaper, it's the same there). That said, there's no reason other DEs couldn't handle it the same way. A ext-session-lock-v1 locker could also become a simple compositor like this and just pass the buffer forward.
@jwz This one is a simple nested compositor indeed, as that's what was easy to do with the available ready-made building blocks :) But technically it doesn't even have to be a "compositor" at all to do this. Wayland itself is a buffer-passing protocol with some optional extras on top after all, so it could pass the client's wl_buffer straight to the server.
@dos So does this involve process B rendering onto a wl_surface made by process A? Or is it a whole nested compositor?