Skip to content

Commit c5cf8ef

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents c2a4857 + b3cada7 commit c5cf8ef

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

docs/llms-full.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5308,6 +5308,7 @@ The following tables compare a standard Compose `Window()`, the JBR module (`dec
53085308
| Custom title bar content | No | Yes (fully undecorated) | Yes (fully undecorated) |
53095309
| Window controls | WM-provided | Compose `WindowControlArea` (SVG) | Compose `WindowControlArea` (SVG) |
53105310
| Desktop environment styling | WM-provided | GNOME Adwaita / KDE Breeze icons | GNOME Adwaita / KDE Breeze icons |
5311+
| System button layout | WM-provided | Reactive (GSettings observer) | Reactive (GSettings observer) |
53115312
| Window shape | WM-provided | Rounded corners (GNOME 12dp, KDE 5dp top only) | Rounded corners (GNOME 12dp, KDE 5dp top only) |
53125313
| Title bar drag | WM-provided | `JBR.getWindowMove()` | `_NET_WM_MOVERESIZE` via JNI or Compose fallback |
53135314
| Double-click maximize | WM-provided | Compose detection | Compose detection |
@@ -5790,6 +5791,29 @@ On Linux, the module detects the current desktop environment and loads the appro
57905791

57915792
Detection uses `XDG_CURRENT_DESKTOP` and `DESKTOP_SESSION` environment variables.
57925793

5794+
### System Button Layout
5795+
5796+
On GNOME, the module reads the `org.gnome.desktop.wm.preferences` → `button-layout` GSettings key to determine which titlebar buttons to display and on which side. This is done via `libgio` (`dlopen`, no hard compile-time dependency).
5797+
5798+
The layout updates **reactively** — if the user changes the button configuration in GNOME Tweaks (or via `gsettings set`), the title bar updates in real time without restarting the application.
5799+
5800+
Supported configurations include:
5801+
5802+
- `:minimize,maximize,close` — right side, all buttons (GNOME with tweaks)
5803+
- `close,minimize,maximize:` — left side, Ubuntu style
5804+
- `appmenu:close` — right side, close only (GNOME default)
5805+
5806+
On **KDE** and other desktop environments, the module falls back to the default layout (close, maximize, minimize on the right).
5807+
5808+
If you need the layout value directly (e.g. for custom rendering), use the `rememberLinuxButtonLayout()` composable:
5809+
5810+
```kotlin
5811+
val layout = rememberLinuxButtonLayout()
5812+
// layout.buttons — ordered list of visible buttons
5813+
// layout.controlsOnRight — true if buttons are on the right side
5814+
// layout.hasClose / layout.hasMinimize / layout.hasMaximize
5815+
```
5816+
57935817
---
57945818

57955819
# Decorated Window — Jewel

0 commit comments

Comments
 (0)