]> git.mdlowis.com Git - proto/labwc.git/commit
ssd: add window drop-shadows (#1648)
authorDavid Turner <git@dwt27.co.uk>
Mon, 22 Apr 2024 18:27:53 +0000 (19:27 +0100)
committerGitHub <noreply@github.com>
Mon, 22 Apr 2024 18:27:53 +0000 (19:27 +0100)
commitce0d2c29669ed7285cd25d70e1d40fff80201438
treeb1af31a25406d03a57321275a4230803e8307f45
parentb0ba585ff860e3f0e21967c8f90467744c2fc571
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.
13 files changed:
docs/labwc-config.5.scd
docs/labwc-theme.5.scd
docs/rc.xml.all
docs/themerc
include/config/rcxml.h
include/ssd-internal.h
include/ssd.h
include/theme.h
src/config/rcxml.c
src/ssd/meson.build
src/ssd/ssd.c
src/ssd/ssd_shadow.c [new file with mode: 0644]
src/theme.c