Skip to content
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

FB5347338: Get the actively shown image of a dynamic desktop wallpaper #23

Open
sindresorhus opened this issue Aug 11, 2019 · 0 comments

Comments

@sindresorhus
Copy link
Member

  • Date: 2018-09-28
  • Resolution: Open
  • Area: AppKit
  • OS: macOS 10.14
  • Type: Suggestion

Description

The NSWorkspace.shared.desktopImageURL method is useful for getting the currently active desktop wallpaper, but for dynamic wallpapers it just returns the HEIC file, which contains all the images, but there's no way to know which of those images are currently being shown on the desktop.

Steps to Reproduce:

  • Go to the "Desktop and Screen Saver" preference pane in "System Preferences".
  • Ensure it's set to a dynamic wallpaper.
  • Run NSWorkspace.shared.desktopImageURL(for: NSScreen.main!) in Playground.
  • Notice that it returns a HEIC file, like "file:///System/Library/CoreServices/DefaultDesktop.heic".

Expected Results:
I expected there to be a way to get the currently shown image of a dynamic wallpaper.

This is important for being able to imitate the desktop, for example, for hiding the desktop icons momentarily while doing a screen recording.

Actual Results:
There no way to find this out, which makes the NSWorkspace.shared.desktopImageURL method not reliable in all cases, even less when dynamic wallpapers gets popular.

Notes:
Relevant GitHub issue: sindresorhus/macos-wallpaper#17

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

No branches or pull requests

1 participant