Multiple viewports on winit backend #858
Replies: 2 comments 6 replies
-
Looks pretty interesting but why multiple viewports? I'm actually too young for FVWM 2 but I'm interested in infinite desktop which behaves as cardboard where you can pin quick notes to windows etc. |
Beta Was this translation helpful? Give feedback.
-
So, in principle I welcome work on multi-window support, because we have been trying to allow that for our X11-backend and also plan for it on the Wayland-backend. BUT, we actually want to deprecate the If you want to use it, I would actually suggest copying it into your own source tree (and make any modifications to it you feel like). Though this might raise another discussion. I think we have talked about some |
Beta Was this translation helpful? Give feedback.
-
Hi everybody! I've always been inspired by FVWM2's infinite desktop, but never learned how the hell to configure the damn thing. Much easier to build my own, right? Say hello to Charlie:
Screencast.from.2023-01-11.22-25-15.webm
What you're seeing is two viewports into the same screen space, rendered into separate winit windows. I managed to get multi-head output from winit by implementing my own winit backend which shares the winit event loop between multiple windows.
I posted this the other day which enables it, but when @heavyrain266 mentioned I had left the repo on private, I realized I need to polish that code some more. Well, here it is.
I actually got the single-window version working last week with 0.3.0 stable (complete with glxgears and chromium -- which curiously fail to show up right now), but then I failed miserably at porting what I had to the udev backend. The wrapper code was just so different, especially considering that the winit backend assumes a single output and on udev there is no such limitation. (And also I had no idea what I was doing and was just cutting up and rearranging the Anvil code until I figured out where to start making modifications.)
So there was no clear path from point A (single winit window) to point B (multiple udev displays). Before I would try my hand at establishing such a path (by way of the
Engine
trait), I decided to upgrade to master -- and boy oh boy was that a wild ride. It took me a couple days just to opt out of the new damage tracking! I plan to try my hand at writing my own damage tracking and component system later on.Then it took me some more time to figure out why my surfaces/buffers weren't being imported. I love what yall doing with the delegations, typed state, and global dispatch, but there's just no way a newb like me could wrap their noggin around the control flow by just grepping through the codebase, right? Probably if I had read up on the protocol, it would've taken me less time to figure out that I needed this - but I learn better by doing.
It's great to see how Rust enables me to build things I've previously only dreamed of. A lot of the time I'm thinking, "what the hell am I even doing", then it finally compiles, and works out of the box, and I get a shard of my soul back. I've got a couple of pretty damn crazy ideas for how I want this to work, so stay tuned.
Beta Was this translation helpful? Give feedback.
All reactions