Browse Source

Make sure the main windows has focus on start up

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
f772e28bf9
  1. 2
      src/main.cpp
  2. 2
      src/mainwindow.cpp

2
src/main.cpp

@ -296,6 +296,8 @@ int main(int argc, char *argv[]){ @@ -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);

2
src/mainwindow.cpp

@ -237,6 +237,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo @@ -237,6 +237,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
} else {
if(pref.startMinimized())
showMinimized();
else
setFocus();
}
// Start watching the executable for updates

Loading…
Cancel
Save