diff options
| author | srdusr <[email protected]> | 2026-07-27 01:33:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-07-27 01:33:00 +0200 |
| commit | 3c47912ae0a2b81d06e4e9101b5b4e2f1e2997d9 (patch) | |
| tree | be0aa3740beb1ec18dfccbd68a4fcf16faa8638b /docs/FEATURE_GAP.md | |
| parent | e20d49b0ee3dbd83499445d61eb2d65904d74311 (diff) | |
| download | srdwm-3c47912ae0a2b81d06e4e9101b5b4e2f1e2997d9.tar.gz srdwm-3c47912ae0a2b81d06e4e9101b5b4e2f1e2997d9.zip | |
Reach GTK4's window buttons too, and speak the decoration protocol GTK knows
Two findings from reading what other projects do, and then measuring this
machine rather than trusting the reading.
GTK has never implemented xdg-decoration, so a compositor that advertises
only that protocol is invisible to every GTK client on the decoration
question. What GTK does implement is KDE's older
org_kde_kwin_server_decoration - confirmed by reading libgtk-4's own symbol
strings, where the manager, the mode enum and the default-mode handler are
all present, and absent from libgtk-3. That is the channel a KDE session
uses. srdwm now advertises it alongside xdg-decoration, with both answering
from the same policy (theme.default_decorated, theme.force_server_side) so a
client is told the same thing whichever it asks through.
Measured what that actually buys, with WAYLAND_DEBUG on a real GTK4 client:
it binds the manager and receives default_mode(2) = Server, and then never
creates a decoration object for its window. So it changes nothing for a GTK
application's own header bar, and it is kept because it is the correct thing
to advertise and because clients that do honour it - Qt and KDE's own --
now get server-side decoration from srdwm instead of nothing.
The second finding is the one that fixes what was reported. GTK3 and GTK4
put their window buttons under different CSS selectors, and the generated
stylesheet named only GTK3's. A diagnostic rule proved it both ways: a flat
colour reached Nemo (GTK3) through `headerbar button.titlebutton` and
gnome-calculator (GTK4) through `windowcontrols button`, and neither
selector reached the other toolkit. Every style is now written for both, so
a GTK4 application is styled rather than silently skipped. `headerbar`
itself works in both, so the titlebar block needed no split.
Verified on screen: gnome-calculator, a GTK4/libadwaita application, now
draws its header bar in srdwm's own titlebar colour with srdwm's text
colour, where before it kept its theme's.
Also worth writing down, because it bounds what any of this can achieve: an
application's header bar is its own widget. No protocol removes it. GTK_CSD=0
does not, the KDE protocol does not, and neither does forcing server-side
decoration - that only adds a second titlebar above the first. What a
compositor can do is make the two look like one, which is what this does.
Diffstat (limited to 'docs/FEATURE_GAP.md')
0 files changed, 0 insertions, 0 deletions