I have read all discussion there, and while i haven’t understood all technical details, general idea is that mutter is not right place to add Server Side Decorations.
Xwayland app decorations are not drawn by mutter the compositor. The are drawn by the X11 window-manager which happens to a. also be named mutter and b. run in the same process (typically gnome-shell).
My questions is:
If there are proper place to add Server Side Decorations, where it is?
In the world with no Server Side Decorations, is it possible to write “decorator”, which does nothing but wraps application window in Gnome decorations? If the answer is yes, where can I start? assuming zero GTK knowledge.
Here is someone suggesting - right way to draw rounded corners is at compositor level, but, probably winit also could do this (and shadows) using libdecor?
For floating windows, the toolkit must draw the rounded corners. In gnome-shell, the corner rounding is done automatically in the compositor along the edges of the panel, but you’ll see it most often with maximized windows.
You can see this if you try to drag a window along the top bar in gnome shell. Or if you try out GTK applications on a different compositor, the rounded corners go away when the window is maximized. If sctk wanted to do this, it could just copy what GTK does.
It is entirely true that wayland expects windows to draw their own decorations
Whilst it’s true the xdg-decorationextension exists it is an extension - wayland implementations don’t have to provide it (as you noticed mutter doesn’t). Even if they do it doesn’t actually mean they support “SSD” - It simply allows a client to request them. A compositor is explictly allowed to refuse leaving the client to draw anyway.