Menu

A live wallpaper that draws 0 frames when nothing moves: building one in Rust and wgpu
📰

A live wallpaper that draws 0 frames when nothing moves: building one in Rust and wgpu

DEV Community: rust·NoThink·3 days ago
#qgspWzj6
#devtorust#devto#dev#windows#window
Long article (788 words) — no AI summary yet.
Reading 0:00
15s threshold

Most "live wallpaper" apps play a looping video behind your icons. That is simple and it looks good, but a video decoder never stops: the GPU and the battery pay for every frame, even when you are staring at a spreadsheet and the wallpaper is hidden behind it.

I wanted the opposite for ChillDesk , a winter scene that lives behind the desktop icons on macOS and Windows: draw in real time, and draw nothing when nothing moves. These are the parts that took the most work.

1. Getting a window behind the icons

There is no public "wallpaper window" API on either OS, so each platform needs its own trick.

macOS. The scene is an ordinary borderless window placed at kCGDesktopWindowLevel . That level sits above the wallpaper picture and below Finder's desktop icons. The window joins every Space and ignores the mouse, so clicks still reach the icons.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.