GTK 3 windows get Chandra's frame: org_kde_kwin_server_decoration
CI / test (push) Successful in 12m52s

GTK 3 has no xdg-decoration support, so every GTK 3 window without its own
header bar (Webby, Nemo-style apps) drew GTK's fallback title bar: a centered
title, only a close button, and a dark border inside Chandra's CSD box.
GTK 3 asks for server-side decoration through KWin's
org_kde_kwin_server_decoration instead. Chandra now advertises it with
default mode Server; request_mode(Client) (GTK 3 apps with a header bar)
keeps their own frame.

The Settings portal also answers org.gnome.desktop.wm.preferences
button-layout "appmenu:minimize,maximize,close", so apps that still draw
their own title bar show the same three buttons as Chandra's frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hghaEWWsCBgEq6iZHj
This commit is contained in:
Claude committed 2026-11-26 02:37:48 +00:00
1 parent 63ce79fa7c
commit f0c39757d7
4 files changed
+117 -4

No files matched your search

+12 -1
View File
@@ -71,9 +71,20 @@ pub fn namespace_matches(patterns : Array[String], ns : String) -> Bool {
///| The settings we know, as (namespace, key, value).
fn SettingsPortal::settings(self : SettingsPortal) -> Array[(String, String, @network.DValue)] {
[(appearance, "color-scheme", U32(color_scheme(self.dark)))]
[
(appearance, "color-scheme", U32(color_scheme(self.dark))),
// Title bar buttons of apps that draw their own (GTK header bars, GTK 3's fallback title
// bar): the same three as Chandra's frame. GNOME's default is "appmenu:close".
(wm_preferences, "button-layout", Str(button_layout)),
]
}
///|
pub let wm_preferences : String = "org.gnome.desktop.wm.preferences"
///|
pub let button_layout : String = "appmenu:minimize,maximize,close"
///|
let introspection : String =
#|<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+11 -2
View File
@@ -49,10 +49,19 @@ test "ReadAll filters namespaces, with globs" {
call(@portal.settings_iface, "ReadAll", [Arr("s", pats.map(s => @network.DValue::Str(s)))]),
)
}
assert_eq(all([]), Ok(want))
let wm : @network.DValue = Entry(
Str("org.gnome.desktop.wm.preferences"),
@network.dict("v", [("button-layout", Variant(Str("appmenu:minimize,maximize,close")))]),
)
let both = match want[0] {
Arr(t, es) => [@network.DValue::Arr(t, [..es, wm])]
_ => []
}
assert_eq(all([]), Ok(both))
assert_eq(all(["org.freedesktop.*"]), Ok(want))
assert_eq(all(["org.freedesktop.appearance"]), Ok(want))
assert_eq(all(["org.gnome.*"]), Ok([Arr("{sa{sv}}", [])]))
assert_eq(all(["org.gnome.*"]), Ok([Arr("{sa{sv}}", [wm])]))
assert_eq(all(["org.kde.*"]), Ok([Arr("{sa{sv}}", [])]))
}
///|