News for hackers. Stuff that matters.
Re:How X Window Managers Work, and How to Write One (2014) by samus on Wednesday November 03, 2021 @09:52AM (#29094536)
It's quite ardous and unfun, but the wlroots project does most of the heavy lifting. For beginners it's probably useful to create a toy WM using wlroots[0] and dig deeper from there[1].

[0]: https://gitlab.freedesktop.org/wlroots/wlroots/-/tree/master... [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/Getti...

Re:How X Window Managers Work, and How to Write One (2014) by ashkankiani on Wednesday November 03, 2021 @01:16PM (#29097583)
sway and wlroots have some of the worst error handling I've ever seen in C code. The number of null pointer bugs and assertion bugs is just mind-boggling. I don't really understand how hard it is to just gracefully handle errors. Literally no one would prefer to crash their entire desktop environment rather than have it silently skip over errors and output them to a log.

I recently used i3 again because my office computer has an NVIDIA GPU and sway doesn't support NVIDIA (yes I'm aware of the new GBM API, it's not ready yet and I don't care anymore anyway). It made me realize how much more gracefully i3 handles a lot of things, and also a few things it really doesn't (but that's more the fault of X11, not i3).

It's disappointing that the defacto library for Wayland is wlroots given those bugs.

Re:How X Window Managers Work, and How to Write One (2014) by md8z on Wednesday November 03, 2021 @01:36PM (#29097861)
I don't know where you heard that, but wlroots is not the defacto standard, there are several other libraries. Off the top of my head, there is libweston, mutter, mir, qtwayland, smithay, and probably some others aimed at embedded that I can't remember...

Edit: also this one somebody wrote in HTML5 and typescript https://github.com/udevbe/greenfield

Re:How X Window Managers Work, and How to Write One (2014) by phendrenad2 on Wednesday November 10, 2021 @08:40AM (#29174486)
Not sure why this is downvoted. wlroots wants to be a de-facto standard, and the devs have put in a lot of effort to document how to use it. But it's far from a true de facto standard, since most wayland window managers use their own library.
Re:How X Window Managers Work, and How to Write One (2014) by wing-_-nuts on Wednesday November 03, 2021 @11:09AM (#29095752)
The last time I used wlroots, via sway, I encountered a bug where I experienced 'multicolored snow' when watching a video in firefox. I wanted to record a video of it to report a bug, but of course that wasn't possible because screen sharing / recording still isn't well supported. Back to gnome I went, and I still don't think wayland is ready for primetime on smaller window managers
Re:How X Window Managers Work, and How to Write One (2014) by Arnavion on Thursday November 04, 2021 @01:29PM (#29110068)
Screensharing on wlroots compositors has been possible since May 2020 (the first release of xdpw).