diff options
Diffstat (limited to '.rules/plan/phase-06-effects.md')
| -rw-r--r-- | .rules/plan/phase-06-effects.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/.rules/plan/phase-06-effects.md b/.rules/plan/phase-06-effects.md new file mode 100644 index 0000000..6a21f72 --- /dev/null +++ b/.rules/plan/phase-06-effects.md @@ -0,0 +1,44 @@ +# Phase 6 — Visual Effects (Compositor Features) + +--- + +## Step 6.1 — Window decorations (title bars) + +For each managed window, draw a simple title bar above it: +- A colored rectangle. +- The window title (from `WM_NAME` or `_NET_WM_NAME` property). +- A close button (clickable, sends `WM_DELETE_WINDOW`). + +Use raylib's `DrawRectangle()` and `DrawText()`. + +**Verify:** Each window has a title bar showing its name. Clicking the +close button closes the window. + +--- + +## Step 6.2 — Drop shadows + +Draw a soft shadow behind each window. Approach: +- Precompute a shadow texture (gaussian blur of a solid rect) at startup. +- Draw it as a 9-slice scaled quad behind each window, offset down and + right by a few pixels. + +Or use raylib's shader system with a blur shader on an expanded quad. + +**Verify:** Each window has a soft drop shadow. Overlapping windows show +correct shadow layering. + +--- + +## Step 6.3 — Window transparency / opacity + +Read `_NET_WM_WINDOW_OPACITY` from each window's properties. Apply it +when drawing the texture (raylib's `DrawTexturePro` with tint alpha, or +a custom shader uniform). + +**Verify:** Run: +```bash +DISPLAY=:1 xprop -f _NET_WM_WINDOW_OPACITY 32c \ + -set _NET_WM_WINDOW_OPACITY 0x7FFFFFFF -id <wid> +``` +to set 50% opacity on a window. It becomes translucent in the compositor. |
