问题描述
想法很简单(从Ubuntu窃取):autohide当你拖动窗口,并开始重叠它。关闭自动隐藏功能,并在Dock位于时将窗口移出区域时显示Dock。
可以使用什么API来实现?
更新:
管理自动隐藏可能从命令行这样,但它是可怕的
默认写com.apple.dock autohide -bool true
killall Dock
Well ,当Dock被配置为(总是)保持可见时,窗口管理器将简单地拒绝将窗口直接定位在Dock下方。它阻止用户将东西放在他们无法到达的地方。 (不是每个用户都是超级用户;不是每个用户都知道Dock可以隐藏,因为Dock没有点击通过...)
系统会隐藏当应用程序全屏时Dock。
除了直接篡改用户的Dock偏好(从不更改用户对第三方的偏好设置应用背后!)像你提到的;
没有API可以控制 Dock ...最多只能建议一个图块以代表您的应用程序出现在Dock上。Idea is simple(stolen from Ubuntu): autohide Dock when you drag window toward it and begin to overlap it. Turn autohiding off and show Dock when window is moved out of area when Dock is located.
What API can be used to achieve that ?
update:
managing autohide possible from command line this way but it's horrible
defaults write com.apple.dock autohide -bool true
killall Dock
Well, when the Dock is configured to (always) stay visible, the Window Manager will simply refuse to position the window directly under the Dock. It prevents users from putting stuff to where they can't reach. (Not every user is a power user; not every user knows the Dock can be hidden and since the Dock has no click-throughs...)
The system will hide the Dock when the app goes fullscreen. But, again, the system takes care of it.
Aside from directly mucking around with the user's Dock preferences (never change a user's preference for a third-party app behind their back!) like you mentionned; it can't be done legitematly.
There's is no API to control the Dock... at best, you can only suggest a tile to represent your app when present on the Dock.
这篇关于当您向其拖动窗口时,可以使用什么API来隐藏OSX Dock的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!