feat: Can a window always on top but behind the taskbar on Win32 (#18982)
For now it only adds the ability to place the window below the task bar while still being always on top. Previous behaviour was always showing the window above the task bar when top is true. We keep this default behaviour, i.e. when the 'level' parameter is omitted. https://github.com/electron/electron/issues/18933 Notes: Can set a window always on top but behind the taskbar on Windows
This commit is contained in:
parent
faa2710485
commit
8b31953d40
4 changed files with 47 additions and 7 deletions
|
@ -1100,10 +1100,15 @@ On Linux always returns `true`.
|
|||
#### `win.setAlwaysOnTop(flag[, level][, relativeLevel])`
|
||||
|
||||
* `flag` Boolean
|
||||
* `level` String (optional) _macOS_ - Values include `normal`, `floating`,
|
||||
`torn-off-menu`, `modal-panel`, `main-menu`, `status`, `pop-up-menu`,
|
||||
`screen-saver`, and ~~`dock`~~ (Deprecated). The default is `floating`. See the
|
||||
[macOS docs][window-levels] for more details.
|
||||
* `level` String (optional) _macOS_ _Windows_ - Values include `normal`,
|
||||
`floating`, `torn-off-menu`, `modal-panel`, `main-menu`, `status`,
|
||||
`pop-up-menu`, `screen-saver`, and ~~`dock`~~ (Deprecated). The default is
|
||||
`floating` when `flag` is true. The `level` is reset to `normal` when the
|
||||
flag is false. Note that from `floating` to `status` included, the window is
|
||||
placed below the Dock on macOS and below the taskbar on Windows. From
|
||||
`pop-up-menu` to a higher it is shown above the Dock on macOS and above the
|
||||
taskbar on Windows. See the [macOS docs][window-levels] for more details.
|
||||
|
||||
* `relativeLevel` Integer (optional) _macOS_ - The number of layers higher to set
|
||||
this window relative to the given `level`. The default is `0`. Note that Apple
|
||||
discourages setting levels higher than 1 above `screen-saver`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue