Hacker News new | past | comments | ask | show | jobs | submit login

Does Gnome still force client side decorations?



Well, not sure, but Wayland certainly does in a technical sense, but your window manager handles that for you. If you are asking, whether Gnome apps have dedicated titlebars, then the answer is that most don't.


There are wayland protocol extensions to support server side decorations: https://wayland.app/protocols/xdg-decoration-unstable-v1 https://wayland.app/protocols/kde-server-decoration

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


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.


Once the application hangs, it won't listen for WM_CLOSE (win32), WM_DELETE_WINDOW (x11) or any other event and won't handle that event. Painting decoration then is purely cosmetic.

Mutter, when it detects non-responsive application, will ask whether you want to kill it, or whether you want to wait a while.


Hangs can be temporary - and in fact this is the most common case IME - and with server side decorations you can still move, resize, minimize, etc. the window while the application is otherwise not responsive. The window manager can also handle a failure to respond to to the close request and offer to kill the process instead - for example KWin does this.

Add to that that server side decorations can achieve a degree of consistency that is just not ever going to happen with client side decorations.


You can move windows without any decorations (press the alt key and drag the window); resizing doesn't really work, as there is nothing to handle the repaint.

Consistency is a matter of POV - it is not really consistent, if your decorations have different widgets, or even font rendering (Qt is quite specific in this) than the rest of the app. The apps themselves are not consistent anyway, so having consistent decorations, for the price of dragging entire widget library and font shaping & rendering into the compositor process is not worth it. That's on top of the synchronization.


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.

Is it the toolkits job or the compositor/wm?


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.?


>> 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.?

I would rather have system styling be done by the system not in any applications. Doesn't that sound logical?

I would also like the system to remember window placement, since it has responsibility for user dragging and applications no longer have access to their position or the ability to change it.


Yes - that's what libraries are for.

This is a strange argument - replacing the subject matter with something else to demonstrate the absurdity - would you have regex parsing in every application, or would you have regex parsing in a central system process?


The frustration I see most from this is on hiDPI displays and any electron apps (which there are plenty)

Supposedly it's been fixed recently: https://github.com/electron/electron/pull/29618


On Wayland it always uses client side decorations. Some programs do not have a title bar at all, and therefore they draw the decorations client side on X11 too.

Or do you mean the GNOME compositor?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: