Commit graph

38 commits

Author SHA1 Message Date
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
Kovid Goyal
7199c62b76
... 2021-04-05 10:13:33 +05:30
Kovid Goyal
2074a0d958
Forgot that the top margin is scaled 2021-04-05 09:57:44 +05:30
Kovid Goyal
3e2b626107
Inform compositor of visible window geometry
The numbers dont make logical sense, but they do what is expected on
GNOME and since only GNOME is stupid enough to insist on CSD, that's
all we care about.
2021-04-05 09:10:47 +05:30
Kovid Goyal
07de9c021d
Decrease shadow intensity when un-focused 2021-04-04 23:04:12 +05:30
Kovid Goyal
ff420b6495
Render top CSD shadow 2021-04-04 22:49:07 +05:30
Kovid Goyal
78908e5b93
Finish rendering of side shadows for CSD 2021-04-04 20:16:13 +05:30
Kovid Goyal
bd6643a523
Use a tile to reduce startup CPU cost of shadows 2021-04-04 18:16:33 +05:30
Kovid Goyal
71fddeb1f5
Start work on shadow based CSD 2021-04-04 17:13:50 +05:30
Kovid Goyal
e209c3329b
Allow specifying a right_margin that is not rendered for the CSD title
Can void double rendering if I ever decide to add button to the titlebar
2021-04-01 22:50:54 +05:30
Kovid Goyal
b7d967b6bc
Dont offset title from left edge 2021-04-01 18:19:59 +05:30
Kovid Goyal
a1669267b3
Fix hiding on window decorations not working with new CSD code 2021-04-01 12:32:48 +05:30
Kovid Goyal
bbb40f2a21
Use a little less contrast for CSD title 2021-04-01 12:20:53 +05:30
Kovid Goyal
b1da76eefa
Set CSD color based on focus state 2021-04-01 10:54:22 +05:30
Kovid Goyal
5d496216e0
Implement rendering of titles in CSD 2021-04-01 10:23:04 +05:30
Kovid Goyal
53f2df115e
Hook up re-render of title bar when title changes 2021-03-29 12:15:47 +05:30
Kovid Goyal
0593158a86
Refactor CSD code to avoid un-needed rerenders and use a single shm pool for all CSD buffers 2021-03-29 12:15:47 +05:30
Kovid Goyal
c1f8372efc
Hide edges when not focused 2021-03-29 12:15:47 +05:30
Kovid Goyal
6e3db0be3d
Rename variable 2021-03-29 12:15:47 +05:30
Kovid Goyal
0f084faca5
Forgot to scale the title buffer 2021-03-29 12:15:47 +05:30
Kovid Goyal
c6829766bb
Properly scale the decorations buffers 2021-03-29 12:15:47 +05:30
Kovid Goyal
e7931b0121
Get rid of the no longer needed viewporter protocol 2021-03-29 12:15:47 +05:30
Kovid Goyal
aeb82e7fb0
Refactor the rendering of CSD on Wayland 2021-03-29 12:15:47 +05:30