Status update May 2025
Hello there, how are you? It's been a while right? Let's write a lot of "I" sentences \o/
If you've been reading my previous post, knows that I haven't beat my PB, but that I recovered just fine, without too much of too bad moments. I feel fine, and wanna beat the world down! Am frustrated at my current professional situation. Still wants to do more open-source, rather that working for capitalists…
Even if I used this time to recover, I still did things for the LOSS ecosystem, as usual. Let's try to remember major milestones.
The most signifiant step probably is my work on the wlvncc project. This is a Wayland VNC client, that has been developed firstly to test wayvnc, its server counterpart. I've been using it for sometime to take control to my tablet/laptop, from my main workstation. But had multiple issues with it… Let's write code!
I started rewriting the whole image compositioning code. The client buffer was scaled and positioned at the center manually, without taking care of the fractional scale value. The surface was also poorly responding to resize events, causing massive breakages when the server image was updated soon enough after a resize. I used the Wayland subcompositor, and viewporter, to delegate everything to the compositor. We dropped all internal scaling, meaning that the VNC client surface now stay sized the same way as the server one. The benefits are first that the whole surface is now scaled just once, and in a scaling agnostic manner. And second that resize events now only reconfigure the positioning values, without needing to re-allocate the buffers. Less code, fewer bugs, better performances!
Then we were suffering multiple issues with focus and unfocus events. Multiple time I broke the keyboard state, with no way to recover, rather than restarting the whole program. Or that some keys was left latched after a pointer unfocus. To handle those events correctly, I had to store some state data, as pressed keys, to be able to release them while unfocusing.
And the next big deal was about the multiple image buffering. I discovered that I lacked lot of knowledge around this problematic, as I very poorly understood the buffer rotation logic first. After some reading I still reported some internal problems caused by the current implementation. For example, in situations where the server image was refreshed at a different rate than the local compositor, it could cause some frame to be skipped when they arrive after a previous one, and before the next Wayland frame callback. After a long discuss, we figured that a simplification could improve the situation. The very last received frame should always be the one used to render the next image while compositioning, even if that means that some frame has been skipped in between. This is a VNC client, so we must try to minimize the delay between the user actions, and the images rendered locally.
Another big moment was my coming back to the hare-http third party library. I have cool projects in mind, and wants to use Hare for them. But first we have to upstream better client and server libraries. I sent new patches to implement request/response writing/reading methods. With Drew, we designed some cool stream APIs to help the user to write response to received request. The exact same API has been used for the event loop side, meaning a handler function could technically be used without even knowing if the socket is blocking or not.
Seems enough for now! If I had more time I would have written less.
If this post inspired you, feels free to leave a comment!
Reach me