1

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background将桌面背景视图更改为屏幕保护程序视图。

这是如何实施的?

(如何)我自己能做到这一点吗?

4

1 回答 1

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.)

于 2011-12-13T02:31:17.327 回答