portals icon indicating copy to clipboard operation
portals copied to clipboard

Window decorations key on Settings portal

Open orowith2os opened this issue 2 years ago • 0 comments

Problem

On Linux, window decorations are a mess, especially when it comes to CSDs. Pantheon using Mutter means it is in the same boat as GNOME, where the window decorations are app-drawn and aren't "consistent".

Some apps will follow the GTK button-layout preference to a T (even duplicating buttons if desired), some will manipulate it how they like and only partially follow it, and others won't follow it all.

I'd like to address this by "upstreaming" the button-layout preference, and I imagine Elementary would benefit from this, as they did with the color-scheme preference.

Proposal

Pantheon adds a Window decorations key to the Settings portal, in favor or toolkit-specific implementations (such as GTK).

The art of drawing the decorations, aka the SSD vs CSD argument, is out of scope here. This is just general preferences around how to draw them. With the xdg-decoration Wayland protocol and this portal preference, the UX is more consistent, and more desktop-agnostic.

Prior Art (Optional)

See https://github.com/flatpak/xdg-desktop-portal/pull/996, heavily based off of how GTK handles it.

orowith2os avatar Jun 25 '23 04:06 orowith2os