以编程方式设置 OS X Lion 全屏桌面图像
在 OS X Lion 中,当用户切换应用程序全屏时,窗口会向右移动到新空间,并且该新空间具有默认背景。
在 QuickTime X 中,当用户切换全屏时,创建的新空间上的桌面背景为黑色。
是否有代码可以为新创建的空间提供自定义桌面图像? 我知道可以通过系统首选项更改 Lion 中每个空间的桌面背景,但我不需要更改它,而是在创建空间时就已经设置好它,以便让应用程序全屏显示。
In OS X Lion, when user toggle app full-screen, the window moves to the right to the new space and this new space has a default background.
In QuickTime X, when user toggle full screen, desktop background on the new space that gets created is black.
Is there a code to have a custom desktop image for the newly created space?
I know that it's possible to change the desktop background of every space in Lion through system preferences but I need not to change it, but to have it already set up when the space gets created for letting the app going full-screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,没有。将应用程序转换为全屏时会显示默认的亚麻纹理(以便它拥有自己的空间)。
可以使用 NSWorkspace 中提供的方法(即
– setDesktopImageURL:forScreen:options:error:
)为普通的非应用程序空间设置不同的桌面图片,但它们不这样做并不能真正让你控制图像设置的空间——它似乎只是设置你当前所在的任何空间。可悲的是,答案是否定的。
Unfortunately, no. The default linen texture is shown when transitioning an application to a full screen (so that it has it's own space).
It's possible to set different desktop pictures for normal, non-application spaces using the methods available in
NSWorkspace
(i.e.– setDesktopImageURL:forScreen:options:error:
), but they don't really let you control the space that the image is set on – it seems to just set whatever space you're currently on.So sadly, the answer is no.