Add a drop shadow cast by the frame #12

Merged
darman merged 1 commits from feature/drop-shadow into develop 2026-08-01 11:44:36 +02:00
Owner
No description provided.
darman added the
bump
skip
label 2026-08-01 11:42:49 +02:00
darman changed target branch from feature/inward-glow to develop 2026-08-01 11:43:59 +02:00
darman added 1 commit 2026-08-01 11:43:59 +02:00
Add a drop shadow cast by the frame
Version Bump / apply-version-bump (pull_request) Successful in 20s
Version Bump / check-bump-label (pull_request) Skipped
d69fe10b46
New plugin:hyprchrome:shadow_size (px, 0 = off), shadow_color and
shadow_offset (vec2). Off by default, so existing setups are unchanged.

The silhouette is the frame's own outer boundary - extracted out of
GetBorderTexture into AppendFrameOuterPath so the shadow and the shape
casting it can't drift apart - filled into an A8 mask, blurred with three
box passes, then tinted. The frame's cutouts (side notches, the strip
beside the title bar) are part of that outline, so they cast their shape
for free.

Three things worth not undoing later:

- The window's interior is cleared after the blur, not before. Punching
  it first leaves the blur smearing shadow inward across the window's own
  content. Clearing afterwards puts the cut exactly on the ring's inner
  boundary, where the frame's opaque pixels hide it.
- The shadow is not part of the decoration's reserved extents, since
  reserving it would push neighbouring windows away by the shadow's
  width. It's drawn past the decoration's box instead, which is why
  damageEntire() and boundingBox() expand by ShadowMarginLogical().
- It renders at no more than kShadowMaxDim px on the long edge and lets
  the GPU upscale. A blurred blob loses nothing to that, and a
  full-resolution blur would otherwise be re-run per frame for the whole
  length of a resize animation.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
darman merged commit e60581a760 into develop 2026-08-01 11:44:36 +02:00
darman deleted branch feature/drop-shadow 2026-08-01 11:44:37 +02:00
Sign in to join this conversation.