🍎 Remove deprecated dock
window level
According to the Apple docs, the `NSDockWindowLevel` constant is deprecated: https://developer.apple.com/reference/appkit/nsdockwindowlevel?language=objc
This commit is contained in:
parent
3e128abb73
commit
3dde669ee8
3 changed files with 3 additions and 2 deletions
|
@ -1073,6 +1073,7 @@ void NativeWindowMac::SetAlwaysOnTop(bool top, const std::string& level) {
|
||||||
} else if (level == "screen-saver") {
|
} else if (level == "screen-saver") {
|
||||||
windowLevel = NSScreenSaverWindowLevel;
|
windowLevel = NSScreenSaverWindowLevel;
|
||||||
} else if (level == "dock") {
|
} else if (level == "dock") {
|
||||||
|
// Deprecated by macOS, but kept for backwards compatibility
|
||||||
windowLevel = NSDockWindowLevel;
|
windowLevel = NSDockWindowLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -832,7 +832,7 @@ On Linux always returns `true`.
|
||||||
* `flag` Boolean
|
* `flag` Boolean
|
||||||
* `level` String (optional) _macOS_ - Values include `normal`, `floating`,
|
* `level` String (optional) _macOS_ - Values include `normal`, `floating`,
|
||||||
`torn-off-menu`, `modal-panel`, `main-menu`, `status`, `pop-up-menu`,
|
`torn-off-menu`, `modal-panel`, `main-menu`, `status`, `pop-up-menu`,
|
||||||
`screen-saver`, and `dock`. The default is `floating`. See the
|
`screen-saver`, and ~~`dock`~~ (Deprecated). The default is `floating`. See the
|
||||||
[macOS docs][window-levels] for more details.
|
[macOS docs][window-levels] for more details.
|
||||||
|
|
||||||
Sets whether the window should show always on top of other windows. After
|
Sets whether the window should show always on top of other windows. After
|
||||||
|
|
|
@ -494,7 +494,7 @@ describe('BrowserWindow module', function () {
|
||||||
describe('BrowserWindow.setAlwaysOnTop(flag, level)', function () {
|
describe('BrowserWindow.setAlwaysOnTop(flag, level)', function () {
|
||||||
it('sets the window as always on top', function () {
|
it('sets the window as always on top', function () {
|
||||||
assert.equal(w.isAlwaysOnTop(), false)
|
assert.equal(w.isAlwaysOnTop(), false)
|
||||||
w.setAlwaysOnTop(true, 'dock')
|
w.setAlwaysOnTop(true, 'screen-saver')
|
||||||
assert.equal(w.isAlwaysOnTop(), true)
|
assert.equal(w.isAlwaysOnTop(), true)
|
||||||
w.setAlwaysOnTop(false)
|
w.setAlwaysOnTop(false)
|
||||||
assert.equal(w.isAlwaysOnTop(), false)
|
assert.equal(w.isAlwaysOnTop(), false)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue