From cfd2576002d1c849e20fc10c0af3a0009d0b1557 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 6f9aad239..6779d034e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -255,9 +255,13 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo 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();