Hide window and dock icon on macOS when tray enabled.

Transforms application into a UIElement agent app when
minimize to tray is enabled and the window is hidden.
This hides the dock icon and removes the application
from the Cmd+Tab listing. The changes work well together
with macOS's inbuilt hide feature.

Also fixes the buggy tray icon context menu trigger behaviour.
macOS triggers the tray context menu also on normal left
click, which causes the window to toggle at the same time
as the menu. To fix this, window toggling has been disabled
altogether on macOS and users will be shown only the context
menu from now on.

Fixes #1334
This commit is contained in:
Janek Bevendorff
2020-05-26 21:46:28 +02:00
parent b17b9683e1
commit af6493b07b
7 changed files with 60 additions and 23 deletions

View File

@@ -141,7 +141,6 @@ private:
static const QString BaseWindowTitle;
bool shouldHide();
void saveWindowInformation();
bool saveLastDatabases();
void updateTrayIcon();