I like Gnome, but this decision always seemed technically wrong to me. From a practical point of view I don't care if GTK or the compositor handles it, but if I put on my programmer hat it seems like the compositor should be doing decorations.
On the other side of the line, both Windows and macOS do client-side decorations too. Most developers do not realize that, but it is being done in process of each client, by the libraries that are mandatory to link to on these platforms.
If is difficult to synchronize two different processes to do frame-perfect rendering. In the end, it is unnecessary complexity, when you can do in-process.
It's not unnecessary complexity as long as applications can hang. Windows papers over this problem by drawing server side decorations once this is detected but it is far from perfect - and it means you need support for server-side decorations anyway.
I kinda disagree - I think the compositor's job is to composite framebuffers of multiple apps together, basically blitting and alpha-blending textures.
Imagine if it needed to decorations as well, how much info and dependencies would the pull in - it would need to be aware of the system themes and styles, have some library to draw them, which would be less efficient, since it would need another separate drawing context just for drawing the headers.
Yes and no. On Wayland an app has no access to its context. I.e. location on the screen, or ability to move itself. So dragging by the title bar is the compositor/WMs job. That means the WM has to know where those higher level controls are. It's also not really an applications job to manage its look as in themes.
And you would rather have that complexity in every application, even those that have no reason to use system styling otherwise like minimalist video players and information displays, games, etc.?
They are both unstable, but Gnome has indicated that they are not planning to implement server side decorations even if it was a stable extension: https://gitlab.gnome.org/GNOME/mutter/-/issues/217
If is difficult to synchronize two different processes to do frame-perfect rendering. In the end, it is unnecessary complexity, when you can do in-process.
Continue this thread — 3 replies
Is it the toolkits job or the compositor/wm?
Continue this thread — 2 replies
Supposedly it's been fixed recently: https://github.com/electron/electron/pull/29618