Currently the state of window decorations on Linux is a bit weird, with X11 having SSDs, Wayland not requiring SSDs and applications ignoring the lack of xdg-decoration support, or applications that draw client side decorations (like libadwaita apps, or Chrome/ium, Firefox) not following some system themes.
Having a WindowDecorations key can be useful to specify if the user wants the close/max/min buttons to show, and whether or not they should show on the left or right sides of the application headerbar.
I don't believe this would be good as a Wayland or X11 protocol, but rather something independent of the display server.
On top of the main three buttons, maybe a Titlebar option too? So that compositors that don't implement xdg-decoration (but don't want CSDs) can disable it there.
Additionally, maybe this could include a filesystem link to some SVG files to be used for the icons (/run/user/UID/theme/close.svg)? This part might be out of scope, and applications might not agree on this part.
This could be done alongside org.freedesktop.appearance.color-scheme, as org.freedesktop.appearance.windowdecorations.
color-scheme: https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.Settings.xml#L32
Currently the state of window decorations on Linux is a bit weird, with X11 having SSDs, Wayland not requiring SSDs and applications ignoring the lack of xdg-decoration support, or applications that draw client side decorations (like libadwaita apps, or Chrome/ium, Firefox) not following some system themes.
Having a WindowDecorations key can be useful to specify if the user wants the close/max/min buttons to show, and whether or not they should show on the left or right sides of the application headerbar.
I don't believe this would be good as a Wayland or X11 protocol, but rather something independent of the display server.
On top of the main three buttons, maybe a Titlebar option too? So that compositors that don't implement xdg-decoration (but don't want CSDs) can disable it there.
Additionally, maybe this could include a filesystem link to some SVG files to be used for the icons (/run/user/UID/theme/close.svg)? This part might be out of scope, and applications might not agree on this part.
This could be done alongside org.freedesktop.appearance.color-scheme, as org.freedesktop.appearance.windowdecorations.
color-scheme: https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.Settings.xml#L32