4 ms·
I too hate the way they deal with CSD and I'd wish they'd change their opinions, but the project is theirs to manage and I can only accept that if I don't like
by jeroenhd 4y ago
I too hate the way they deal with CSD and I'd wish they'd change their opinions, but the project is theirs to manage and I can only accept that if I don't like it I can just use KWin. For those wishing GNOME stuck more to its origins, there's always Cinnamon.
As for the API stuff: why does the display server need to deal with power management? That sounds like something the power management API should do. IMO, the display server should just display things, not manage power states or login states. Wayland draws the screensaver, but the session manager controls the actual session.
Still, there is an open MR to accept this API (https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/111 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/111) that needs to be rebased and needs a bug resolved. The solution falls perfectly in line with the GNOME way of doing things as well (forwarding the Wayland API to DBus so the DBus interface can do its thing), the only problem is that nobody is interested enough to do the hard work.
DBus is an excellent method to communicate anything that doesn't involve exchanging buffers. Many members of the Wayland project are trying to prevent going down the same path X11 went down, sucking up more and more features and API surface and becoming a huge, unstable, buggy mess because of its sheer code size.
As for your mouse cursor issue, Wayland's cursor_theme seems to be supported by at least. I can't find cursor_theme in the Wayland spec itself (there is a merge request at https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/58 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/i... but I don't see much activity) so until that gets stabilized you can choose between using DBus or a bespoke, DE-specific API, pick a compositor that takes away cursor control from the application entirely, or switch back to X11.
- jchw 4y agoSorry, I mean inhibit-idle support from the GTK side, not from the Mutter side. As a client.
- thayne 4y agoOne problem with dbus is that some compositors (for example sway) have a design goal of working in environments where dbus isn't available. And even if that weren't the case it means applications need to deal with multiple asynchronous protocols, which isn't that big of a deal if you are already depending on a big toolkit like gtk, but for a lightweight application that is working directly with wayland (or, say a game that draws everything itself and doesn't use a widget toolkit), it adds a lot of complexity.
- kaba0 4y agoAnd how should such an environment signal power management requests reliably then, without the de facto linux way?
- QUrprUd1nCeicw 4y agoApplications shouldn't use libwayland directly unless you're planning to implement your own toolkit and event loop and threading abstraction yourself. It's certainly a take to do things in the most complex way and then complain that you have to implement a lot of complexity. Off the top of my head, here are things that won't work that way unless you implement them yourself: - Networking. The socket(s) will block your program loop. - Audio. Has to be done on a separate thread with strict timing. - Background loading. Get ready for your program to hang when loading a large file. - Talking to any system services. Every common desktop uses dbus now. Really. Using sway on an embedded system without dbus is a niche. - Power saving modes. Without an event loop you always have to use sleep to poll yourself manually, and that's wasteful. - Simulations, physics, or anything else that requires a constant tick rate. These are dependent on running the rendering in another thread. - Accurate timers. Any issues with any of the above will block a timer from firing. There are probably a lot more too. What seems "lightweight" first can turn out actually not be lightweight at all.
- jcelerier 4y ago> Many members of the Wayland project are trying to prevent going down the same path X11 went down, sucking up more and more features and API surface and becoming a huge, unstable, buggy mess because of its sheer code size. I would argue that if you sum the code of all the Wayland compositors existing today + all the dependencies required for making them work as a proper desktop - dbus, wlroots, ... you likely have much more code (and thus much more bugs overall) than you had for X11. xorg git repo is 400kloc of C, I've seen projects which were on the order of magnitude of 40 million lines of code and still were able to be managed, so to me "sheer code size" sounds a bit weird. Hell, the main project I work on, https://ossia.io https://ossia.io and on which I do the huge majority of the swdev work alone is nearing 500kloc and it does not feel like a burden.
- QUrprUd1nCeicw 4y agoThat's not a good comparison. To get a full picture, you have to compare the X server, all the Xorg drivers, the X client libraries, the X utilities, all the different X window managers and compositors, all the code from alternate X server implementations, etc. X11 desktops are all using dbus too so that one counts for both. All together added up it's significantly more code than Wayland, and that's even considering that the major Wayland compositors try to share as much as possible between the X and Wayland implementations. That is, Mutter and KWin didn't use wlroots. Wayland and X11 are just pluggable backends for them. Go and look there yourself if you want to make your own direct comparison. The Wayland backends are pretty small and they talk to the kernel directly, whereas the X backends have to go through all of that extra code just to talk a complicated protocol to the X server to accomplish the same task. This is different situation for older non-compositing window managers that still use the old X11 drawing primitives. Compositors do all their drawing themselves using direct rendering to the GPU so are able to just swap out the backend without much trouble. That shift was happening in X11 in the years prior to Wayland and it's one of the reasons Wayland is even able to work.