1

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background changes the desktop background view to the screensaver view.

How is that implemented?

(How) can I do this myself?

Albert
  • 65,406
  • 61
  • 242
  • 386

1 Answers1

2

Set a window's level as kCGDesktopWindowLevel and it will appear on top of the desktop picture but under the icons. You'll probably also want to tell the window to ignore mouse clicks unless you want to render portions of the desktop unclickable.

(To clarify: I haven't checked, but I kind of doubt this is actually how the ScreenSaverEngine does its trick. Apple can mingle its apps with each other in ways that you can't — for example, many of the system-provided Menu Extras are half implemented in their .menu bundles and half in the SystemUIServer host process. But this technique gets the effect you're looking for.)

Chuck
  • 234,037
  • 30
  • 302
  • 389
  • Actually, I think some hacks via mach_inject are also always fun. :) But if there is even a documented way to do this, also fine. – Albert Dec 13 '11 at 02:42