diff options
author | Brian Kendall <brian@briankendall.net> | 2020-11-30 21:24:41 +0300 |
---|---|---|
committer | Kevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com> | 2020-12-02 09:54:16 +0300 |
commit | f9991e180ca1cb7d88d773e61c1fe914f31d1791 (patch) | |
tree | 6fda9087d8bbf9d6511dacaecb8be58384c619fb /src/gui/systray.cpp | |
parent | bc38c0ba3f7fac19aeb07ded5fd83f3d149d029e (diff) |
Fix macOS bug where tray window causes spaces to switch
Signed-off-by: Brian Kendall <brian@briankendall.net>
Diffstat (limited to 'src/gui/systray.cpp')
-rw-r--r-- | src/gui/systray.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/systray.cpp b/src/gui/systray.cpp index 7e5c0bb31..422c41b88 100644 --- a/src/gui/systray.cpp +++ b/src/gui/systray.cpp @@ -267,6 +267,14 @@ void Systray::forceWindowInit(QQuickWindow *window) const // this shouldn't flicker window->show(); window->hide(); + +#ifdef Q_OS_MAC + // On macOS we need to designate the tray window as visible on all spaces and + // at the menu bar level, otherwise showing it can cause the current spaces to + // change, or the window could be obscured by another window that shouldn't + // normally cover a menu. + OCC::setTrayWindowLevelAndVisibleOnAllSpaces(window); +#endif } QScreen *Systray::currentScreen() const |