4 ms·
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 ea
by vetinari 5y ago
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.
- account42 5y agoIt'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.
- vetinari 5y agoOnce 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.
- account42 5y agoHangs 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.
- vetinari 5y agoYou 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.