Skip to content

[Feature]: Cache last frame when the background is hidden #36

@artrixdotdev

Description

@artrixdotdev

Problem Statement

When the animated background is not visible, such as when the window is unfocused, minimized, or covered by other windows, it still keeps rendering frames. This wastes GPU resources and increases power usage with no visual benefit.

Proposed Solution

Add a config option called cache-when-hidden.

When enabled, the app should detect whether the background is currently visible. If the background is not visible, the renderer should stop updating the animation, capture the last rendered frame, and display it as a static image instead. When the background becomes visible again, normal rendering should resume.

Alternatives Considered

I've created a higher level workaround at my compositer IPC layer that manually renders the shader via a python script, saves the frame a PNG, and whenever my background is no longer visible it programmatically edits the neowall config to use the background image instead of the shader file and then restarts the daemon. This works fine but adds some extra overhead and has a slightly annoying hiccup between restarts of the daemon (the wallpaper flashes black).

Examples or Mockups

No response

Feature Category

Display Modes (new ways to show wallpapers)

Priority (Your Opinion)

Critical (blocking my workflow)

Use Case

No response

Contribution

  • I would be willing to implement this feature (with guidance)
  • I would be willing to test this feature
  • I would be willing to help with documentation

Additional Context

No response

Pre-submission Checklist

  • I have searched existing issues and discussions
  • This feature aligns with Staticwall's goals (reliable, minimal, Wayland-focused)
  • I have clearly described the problem and proposed solution

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions