From f772e28bf96d9e56e73bfa1fda642da172bac38b Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 26 Dec 2010 13:50:57 +0000 Subject: [PATCH] Make sure the main windows has focus on start up --- src/main.cpp | 2 ++ src/mainwindow.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index a9a31ad48..353b69ddf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -296,6 +296,8 @@ int main(int argc, char *argv[]){ torrentCmdLine.removeFirst(); #ifndef DISABLE_GUI MainWindow window(0, torrentCmdLine); + if(!no_splash) + QObject::connect(splash, SIGNAL(destroyed()), &window, SLOT(raise())); QObject::connect(&app, SIGNAL(messageReceived(const QString&)), &window, SLOT(processParams(const QString&))); app.setActivationWindow(&window); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 55eaf7494..3a7fda3e7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -237,6 +237,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo } else { if(pref.startMinimized()) showMinimized(); + else + setFocus(); } // Start watching the executable for updates