Skip to content

[macOS/Windows] Implement live wallpaper mode. #106478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented May 16, 2025

Adds window flag to move window to the desktop level (above wallpaper, below desktop icons).

Implements godotengine/godot-proposals#5388 for Windows and macOS.

Updated version of the POC from godotengine/godot-proposals#5388 (reply in thread)

	get_window().borderless = true
	get_window().wallpaper = true
	get_window().position = DisplayServer.screen_get_usable_rect(0).position
	get_window().size = DisplayServer.screen_get_usable_rect(0).size

macOS:

Screen.Recording.2025-05-16.at.09.54.22.mov

Windows 11:

Recording.2025-05-16.104713.mp4

@bruvzg bruvzg added this to the 4.x milestone May 16, 2025
@bruvzg bruvzg marked this pull request as ready for review May 16, 2025 09:12
@bruvzg bruvzg requested review from a team as code owners May 16, 2025 09:12
@bruvzg bruvzg requested a review from a team as a code owner May 23, 2025 19:47
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, it works as expected.

Testing project: test_live_wallpaper.zip

Example on macOS 15.4.1 (with maximized window, pure black wallpaper, dock is autohidden so it appears fullscreen):

Screenshot 2025-05-23 at 21 42 42

Some feedback:

  • Per-pixel transparency works. That said, you could also fetch the user's current wallpaper using OS APIs and apply it as a background to your project using a TextureRect, which is more efficient, more reliable and won't prevent you from using effects that only work with opaque viewports.

  • If you only enable the wallpaper flag, the window borders will still be visible, but you can't interact with them (even if you alt-tab to focus the window). Should we make this flag also force the window to be borderless at the same time?

  • Should we have wallpaper as a project setting, so you can enable it without needing a script? This would also allow us to warn users that it won't work when game embedding is enabled, similar to the fullscreen window mode.

  • For a live wallpaper that covers the whole screen without changing workspaces on macOS, it seems you need to use the Maximized window mode, not Fullscreen or Exclusive Fullscreen. I'm curious how you can make the live wallpaper cover what's behind the dock/task bar though (since these are translucent by default).

@shitake2333
Copy link

Providing relevant project settings is very necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants