When the application starts with "Start minimized" enabled on macOS (especially the
sandboxed App-Store build compiled with MACOS_NE), fully hiding the window prevents it from being restored by clicking the Dock icon. The proper behaviour is to start the window in the *minimized* state instead. That way the window is still part of the window list and the system automatically brings it back when the user clicks the Dock icon, replicating the native experience. On the other platforms we keep the old behaviour (hide the window completely and rely on the tray icon), therefore we switch at runtime by checking the current OS. Closes: QA-7 Closes: QA-8
This commit is contained in:
parent
32c3b758af
commit
7b0d17987c
2 changed files with 8 additions and 2 deletions
|
@ -132,8 +132,10 @@ void PageController::showOnStartup()
|
|||
} else {
|
||||
#if defined(Q_OS_WIN) || (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID))
|
||||
emit hideMainWindow();
|
||||
#elif defined Q_OS_MACX and !defined MACOS_NE
|
||||
#elif defined Q_OS_MACX && !defined(MACOS_NE)
|
||||
setDockIconVisible(false);
|
||||
#elif defined(MACOS_NE)
|
||||
emit hideMainWindow();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue