'Notched' server side decorations
Apologies if this is the wrong place or a bad idea. Not a linux dev, and while it makes sense in my head, it could also just not make sense.
This idea is somewhat similar to #167 and !274 however it looks like it's stalled, and I think this method of implementation might be better.
As established by the other issue, fancy client side decorations look really nice, until they aren't consistent. Even high quality CSD implementations like in Firefox can look a little off.
Note the different button spacing
My idea around this is similar to how android appears to handle screen cutouts. In the android developer settings, there's a 'display cutout' option, which adds various fake notches to the screen. As a result, the various elements of the OS are moved around to account for them via what I can only assume is some sort of bounding box for the location of the cutout.
(Notches were added in post because android doesn't show them in screenshots)
In theory this could work the same for decorations. The compositor gives a client the side, alignment, and size of its "notch" bounding boxes, which should be treated as a no-go-zone for UI elements, and the client draws its UI accordingly. Then, the compositor would draw on top of the window.
These "notches" would have 8 anchor points, and their own individual width/height. This gives both sides a large amount of control in terms of how they want to handle things.
Some examples of how a client could handle different "notches". The elements are moved around based on the size and position of the "notch" bounding boxes.
Realistically if a compositor were to have some insane setup with giant buttons and text at each position, the client could just avoid trying to integrate with them at all, and place all the content in the largest possible rectangle that wouldn't interfere with a SSD element. But also why would someone do that.
Not sure about potential performance issues or implementation feasibility, but from a purely design perspective, I think this would be the best solution for the issue of inconsistent CSDs.