# Cube damage and layer ordering, revision 3 The revision 2 clearing fix remains in place. Revision 3 removes the continuous redraw measures that previously concealed damage errors: - Reuse cube-face textures and repaint their accumulated damage. Newly allocated textures still receive a full repaint. - Stop scheduling frames when the cube animation finishes. Child damage drives updates at rest; an extra final animation frame paints the settled geometry. - Remove duplicate whole-output damage during animation. The cube now follows Wayfire's render-instruction contract. It skips empty damage, translates damage into the same output-local coordinates as its render target, limits background rendering to that damage, and scissors the cube's GL draws and depth clear. Previously the background and cube could overwrite pixels that were not scheduled to be repainted, including higher-layer contents. Held-window overlays are inserted above the cube but below SCREENSAVER and LOCK. Previously `add_front(scene_root, overlay)` put them above every normal layer. The desktop sampler can now include those overlays in the desktop composition. Scene rebuilds for held-window transitions, and whole-output damage when activating/deactivating or pausing/resuming the cube, remain necessary. This is not a claim that all full-output repaints can be removed: moving a 3D scene can change any pixel on the output. No public API or ABI changes; the subslot remains `0/0.11.screensaver1`. Oledsaver 1.0.13 already requests the correct screensaver layer and needs no renderer changes for this patch. See `tests/render-regression/README.md` for isolated, reproducible checks. ## Revision 4: panels on empty workspaces and overlay ordering The cube and its held-window overlay now sit below the OVERLAY layer (anchored immediately above TOP). Native Wayland launchers such as Rofi remain above the transformed desktop. Overlay surfaces are excluded from workspace streams so they are not also composited into the cube background or textures. Rotating a desktop panel changes which pass includes it, not its workspace coordinates. Preserve the desktop-environment flag when scheduling and damaging its render instances. This replicates Waybar into every workspace texture, including empty neighboring faces, and updates each copy when the panel changes. No public API or ABI changes; the subslot remains `0/0.11.screensaver1`. The workspace-stream change lives in the compositor executable, so an existing Wayfire session needs a logout/login to use it; restarting Waybar alone cannot load the compositor fix.