Commit graph

12 commits

Author SHA1 Message Date
Kovid Goyal
0331c873f9
Run autoformat 2026-10-30 09:07:45 +05:30
Kovid Goyal
e37f4cd223
Wayland CSD: Cleanup titlebar rendering and button handling
Use enums for titlebar buttons and gestures instead of magic numbers
shared between files. Split up the titlebar renderer. Derive button
colors from the titlebar color so they fit in with custom titlebar
colors. Parse button layouts without a colon the way GTK does, all
buttons on the left. Restore the error message when the compositor
does not support showing the window menu.
2026-10-30 09:06:15 +05:30
Kovid Goyal
a2aa9b739d
Wayland CSD: Parse the titlebar font description once in glfw
Replace glfwGetSystemFont(), which returned a raw Pango font description
that was parsed separately in glfw and kitty, with glfwGetTitlebarFont()
that returns the parsed family, size and style. The parser now handles
font family lists, pixel sizes and the full set of Pango weight and style
names. A text scale less than one is now applied to the header height as
well. The FreeType context for the title font is released on exit and
failures to create it are not retried and reported on every redraw.
2026-10-30 09:03:46 +05:30
Kovid Goyal
53ba16881d
Wayland CSD: Wait briefly for desktop settings before creating a decorated window
On compositors without xdg-decoration, such as mutter, the titlebar height
depends on desktop settings that arrive asynchronously from the portal. If
they arrive after the window is mapped, the window visibly resizes. Wait
up to 200ms for the reply before creating the first such window.
2026-10-30 09:01:46 +05:30
Kovid Goyal
a5c48a3644
Wayland CSD: With system titlebar color and no desktop preference follow the window background
This was the behavior before the GNOME style CSD changes. Also restore
the previous semantics of the initial color scheme notification.
2026-10-30 08:59:34 +05:30
Manuel Villanueva
401d8795f3
Wayland: default CSD to dark when desktop appearance is unavailable 2026-10-29 15:53:45 -06:00
Manuel Villanueva
45282eef7d
Wayland: inherit GNOME titlebar preferences through the desktop portal 2026-10-29 15:35:48 -06:00
Manuel Villanueva
96976d85b6
Wayland: add opt-in built-in GNOME-style window decorations 2026-10-28 23:01:00 -06:00
Kovid Goyal
b0ebd340fe
Function to get the current system color theme 2024-11-07 12:47:06 +05:30
Kovid Goyal
1bffe89b5d
Wayland GNOME: titlebar color now follows system theme
When GNOME system theme is default, the color matches the background
color. When it is dark it is dark.
2024-04-04 21:52:56 +05:30
Kovid Goyal
66801b6b28
GLFW API to track system color scheme dark/light
Implemented only on macOS and Wayland.
2023-04-13 13:16:33 +05:30
Kovid Goyal
63a50ec066
Use the correct mouse cursor theme on GNOME
Relies on a working desktop settings portal (xdg-desktop-portal-gtk)
2021-03-25 12:20:13 +05:30