From c5841146ff369560592423ac34ce32af5b514c3f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 2 Jul 2012 20:56:27 +0300 Subject: [PATCH] Fix issue when "minimize to systray" and "start minimized" are both enabled. Window could not be restored. --- src/mainwindow.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ba3ddb040..6bf0c2b3c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -255,9 +255,13 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa readSettings(); if (!ui_locked) { - if (pref.startMinimized() && systrayIcon) - showMinimized(); - else { + if (pref.startMinimized() && systrayIcon) { + show(); + minimizeWindow(); + // XXX: Using showMinimized() makes it impossible to restore + // the window if "Minimize to systray" is enabled. + //showMinimized(); + } else { show(); activateWindow(); raise();