ssd: add window drop-shadows (#1648)

Add optional drop-shadows to windows using server-side decoration.
Shadows can be enabled/disabled rc.xml and their appearance configured
in themerc.  The default is no shadows to preserve current behaviour.

The shadows are drawn in fixed corner and edge buffers shared between
all windows, the edges are scaled to size depending on the size of each
window.  Two sets of buffers are used to give the different appearances
for active and inactive windows.  I use separate corner/edge buffers for
a few reasons:

- It avoids needing to store a separate large shadow buffer per window
- It avoids needing to redraw the shadows when the window is being
  resized
- Compositing the shadows onto the desktop should be faster as there are
  overall fewer pixels to blend, and scaling up the edge buffers only
  requires reading a tiny buffer which is then replicated.
This commit is contained in:
David Turner 2024-04-22 19:27:53 +01:00 committed by GitHub
parent b0ba585ff8
commit ce0d2c2966
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 606 additions and 0 deletions

View file

@ -33,6 +33,12 @@ window.label.text.justify: center
window.active.button.unpressed.image.color: #000000
window.inactive.button.unpressed.image.color: #000000
# window drop-shadows
window.active.shadow.size: 60
window.inactive.shadow.size: 40
window.active.shadow.color: #00000060
window.inactive.shadow.color: #00000040
# Note that "menu", "iconify", "max", "close" buttons colors can be defined
# individually by inserting the type after the button node, for example:
#