From 7a7016b4bd8009cae0cd86ec9bfaf4f3ca4d78d6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 2 Aug 2011 19:28:31 +0300 Subject: [PATCH] Make sure the window is not hidden on startup if no system tray icon is available --- src/mainwindow.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b4442b4cf..81333bbf6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -252,7 +252,7 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo readSettings(); if(!ui_locked) { - if(pref.startMinimized()) + if(pref.startMinimized() && systrayIcon) showMinimized(); else { show(); @@ -304,6 +304,13 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo updater->checkForUpdates(); } #endif + + // Make sure the Window is visible if we don't have a tray icon + if (!systrayIcon && isHidden()) { + show(); + activateWindow(); + raise(); + } } void MainWindow::deleteBTSession() {