Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Bootstrap.cpp')
-rw-r--r--src/core/Bootstrap.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/core/Bootstrap.cpp b/src/core/Bootstrap.cpp
index 2c25b2505..70ca7eec4 100644
--- a/src/core/Bootstrap.cpp
+++ b/src/core/Bootstrap.cpp
@@ -71,20 +71,10 @@ void bootstrapApplication()
void restoreMainWindowState(MainWindow& mainWindow)
{
// start minimized if configured
- bool minimizeOnStartup = config()->get("GUI/MinimizeOnStartup").toBool();
- bool minimizeToTray = config()->get("GUI/MinimizeToTray").toBool();
-#ifndef Q_OS_LINUX
- if (minimizeOnStartup) {
-#else
- // On some Linux systems, the window should NOT be minimized and hidden (i.e. not shown), at
- // the same time (which would happen if both minimize on startup and minimize to tray are set)
- // since otherwise it causes problems on restore as seen on issue #1595. Hiding it is enough.
- if (minimizeOnStartup && !minimizeToTray) {
-#endif
- mainWindow.setWindowState(Qt::WindowMinimized);
- }
- if (!(minimizeOnStartup && minimizeToTray)) {
- mainWindow.show();
+ if (config()->get("GUI/MinimizeOnStartup").toBool()) {
+ mainWindow.showMinimized();
+ } else {
+ mainWindow.bringToFront();
}
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {