Antoine Cellerier
ef4574ae97
Support hide_window_decorations titlebar-only on Wayland
...
Hide the CSD titlebar subsurface while keeping shadow borders for
resizing. On SSD compositors (GNOME), forces CSD mode to draw
kitty's own shadows without a titlebar.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-08 19:49:44 +01:00
Kovid Goyal
177a3f9e51
DRYer
2025-09-16 08:18:42 +05:30
Kovid Goyal
148d60b9ea
Make CodeQL happy
2025-09-16 07:57:33 +05:30
Kovid Goyal
7738c55c4b
Wayland: Fix incorrect window size calculation when transitioning from fullscreen to non-fullscreen with client side decorations
...
Fixes #8826
2025-07-17 20:36:38 +05:30
Kovid Goyal
af9e9fbc6f
Fix #8138
2024-12-20 08:58:35 +05:30
Kovid Goyal
1ff74b86dc
Wayland GNOME: Workaround bug in mutter causing double tap on titlebar to not always work
...
Fixes #8054
2024-11-18 08:46:17 +05:30
Kovid Goyal
b0ebd340fe
Function to get the current system color theme
2024-11-07 12:47:06 +05:30
Kovid Goyal
f48bcb1a17
Wayland GNOME: Fix a crash when using multiple monitors with different scales and starting on or moving to the monitor with lower scale
...
Fucking GNOME and its fucking lack of support for SSD. How much of my
life I have wasted on these nincompoops.
Fixes #7894
2024-09-26 00:49:04 +05:30
Kovid Goyal
d7902f6b24
Wayland GNOME: Fix a small rendering artifact when docking a window at a screen edge or maximizing it
...
For some reason destroying the shadow surfaces causes mutter to render one of them at its old relative position. So workaround by not destroying the surfaces, modern mutter anyway seems to hide them when the window is docked.
Fixes #7701
2024-08-07 13:34:10 +05:30
Kovid Goyal
8d1b0e54af
Use double for wayland float calculation
2024-04-19 22:23:01 +05:30
Kovid Goyal
63ffa2606c
Give the close X a distressed look
2024-04-17 11:05:05 +05:30
Kovid Goyal
f66ee68834
Wayland GNOME: Draw the titlebar buttons without using a font
...
Fixes #7349
2024-04-17 10:39:30 +05:30
Kovid Goyal
8fc96c5bd7
Make the debug logging functions consistent
...
They now all output the same format of:
[time since program start] msg
2024-04-08 12:53:55 +05:30
Kovid Goyal
208490f4e1
...
2024-04-08 11:18:32 +05:30
Kovid Goyal
d392aba64d
Wayland CSD: Dont render window shadows for docked windows
2024-04-08 10:59:03 +05:30
Kovid Goyal
d630b3d8a7
Change the maximize icon to restore when window is maximized
2024-04-08 09:36:38 +05:30
Kovid Goyal
bf60321466
Use individual surfaces for corner and bar shadows
...
Simplifies a bunch of code and also gives us the option at a later date
to turn off some shadows selectively when the window is in a tiled
state.
2024-04-07 22:28:41 +05:30
Kovid Goyal
eb96830aa0
Make CSD API functions naming consistent
2024-04-07 10:18:13 +05:30
Kovid Goyal
334bb36745
Dont enable CSD for non XDG top-level windows such as layer shell surfaces
2024-04-07 10:08:02 +05:30
Kovid Goyal
283eba9667
Wayland: Respect top level bounds sent by compositor
2024-04-06 17:29:17 +05:30
Kovid Goyal
c651312a88
Adjust button colors
2024-04-06 17:24:55 +05:30
Kovid Goyal
5b1fdc34eb
Wire up the buttons
2024-04-06 14:58:31 +05:30
Kovid Goyal
a158fa108b
CSD pointer enter is the same as move
2024-04-06 12:51:09 +05:30
Kovid Goyal
60cb0fa650
Move CSD pointer handling code into CSD file
2024-04-06 12:49:07 +05:30
Kovid Goyal
4f6faddbab
Implement rendering of window control buttons in CSD
...
They still need to be wired up
2024-04-06 08:32:07 +05:30
Kovid Goyal
416d52bdac
...
2024-04-05 21:33:41 +05:30
Kovid Goyal
9225bd772d
Reduce CSD API surface
2024-04-05 19:57:43 +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
f51c2f08a5
DRYer
2024-04-04 19:11:21 +05:30
Kovid Goyal
b3197e4498
Wayland: Add fractional scale support to CSD
2024-04-04 11:25:17 +05:30
Kovid Goyal
90d2b8330a
...
2024-04-04 10:59:51 +05:30
Kovid Goyal
83468535dd
Implement support for preferred buffer scale
2024-03-21 20:53:36 +05:30
Kovid Goyal
eb42ad3a2b
Rename scale to integer_scale
...
We will presumably have a fractional_scale soon
2024-03-21 20:53:36 +05:30
Pavel Solovev
99b3d0727d
Fix build with gcc14
2024-01-19 11:25:53 +03:00
Kovid Goyal
6890e265b6
GNOME Wayland: Fix a memory leak in gnome-shell when using client side decorations
...
destroy CSD buffers that were never attached explicitly, as mutter does
not send release events for these even when the pool is destroyed.
2022-10-12 17:52:47 +05:30
Kovid Goyal
fbfaefd72a
Wayland: Fix an abort when changing background colors with wayland_titlebar_color set to background
...
Fixes #5562
2022-10-07 14:13:12 +05:30
pagedown
06108d66b1
Replace tab with four spaces indent
2022-08-08 22:31:55 +05:30
Kovid Goyal
2f3dd72c84
Weston: Fix client side decorations flickering on slow computers during window resize
...
Fixes #5162
2022-06-03 11:00:56 +05:30
Kovid Goyal
719339e116
Output debug info about CSD rendering
2022-03-10 19:45:31 +05:30
Alexander Orzechowski
d4b048735d
wayland: Fix CSD size calculations
...
This is a partial revert of e359094cff
window->wl.{width, height} and window->wl.current.{width, height}
represent different things. The former represents the actual size of the
egl surface viewport used for terminal rendering. The former represents
the size of the entire window including the CSD (client side decorations).
These numbers should be the same if CSD is disabled.
2022-03-10 05:56:56 -05:00
Alexander Orzechowski
e359094cff
wayland: move window state
2022-02-28 19:42:11 -05:00
Kovid Goyal
62656b24eb
GNOME: Add a new option to control the color of the kitty window titlebar
2021-04-25 11:22:23 +05:30
Kovid Goyal
253de1eeca
Move the CSD metrics initialization into the CSD module
2021-04-07 22:28:04 +05:30
Kovid Goyal
4e6d5d3f1e
Fix GNOME breaking when setting window geometry
...
The current version of GNOME has a regression that causes the compositor
to send incorrect geometry with the next configure event if the CSD
buffers are created after a call to set_window_geometry.
So call set_window_geometry last. And shake head sadly.
2021-04-07 22:14:09 +05:30
Kovid Goyal
a19d1fc140
Restore size after all types of docking not just maximize/unmaximize
...
We make use of the fact that wayland tells us when the window is being
resized to track actual user requested sizes as opposed to compositor
requested ones.
2021-04-07 15:08:44 +05:30
Kovid Goyal
75ec801941
Get the window geometry with CSD fully correct (I think)
...
The co-ordinates are in the surface co-ordinate system. When the
compositor specifies sizes it apparently adds one subsurface size
in both x and y directions, not both. Possibly because the origin is
placed after the top and left subsurfaces. So modify it by adding
and extra subsurface size to that.
2021-04-07 14:21:43 +05:30
Kovid Goyal
5a1bd93518
Handle all known xdg top level states
2021-04-07 13:33:06 +05:30
Kovid Goyal
f849f383cb
Use the proper number for wayland CSD vertical shadow geometry
...
Apparently set_wayland_geometry uses buffer co-ordinates not surface
co-ords so the numbers need to be multiplied by the scale
2021-04-06 22:19:17 +05:30
Kovid Goyal
d0f34e99a6
Fix fringing in shadow due to using integer operations
2021-04-05 11:09:34 +05:30
Kovid Goyal
c781825b00
Make setting sigma independent of kernel size
2021-04-05 10:55:30 +05:30