mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Make sure the main windows has focus on start up
This commit is contained in:
parent
486f9c55dd
commit
f772e28bf9
@ -296,6 +296,8 @@ int main(int argc, char *argv[]){
|
|||||||
torrentCmdLine.removeFirst();
|
torrentCmdLine.removeFirst();
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
MainWindow window(0, torrentCmdLine);
|
MainWindow window(0, torrentCmdLine);
|
||||||
|
if(!no_splash)
|
||||||
|
QObject::connect(splash, SIGNAL(destroyed()), &window, SLOT(raise()));
|
||||||
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
|
||||||
&window, SLOT(processParams(const QString&)));
|
&window, SLOT(processParams(const QString&)));
|
||||||
app.setActivationWindow(&window);
|
app.setActivationWindow(&window);
|
||||||
|
@ -237,6 +237,8 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
|
|||||||
} else {
|
} else {
|
||||||
if(pref.startMinimized())
|
if(pref.startMinimized())
|
||||||
showMinimized();
|
showMinimized();
|
||||||
|
else
|
||||||
|
setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start watching the executable for updates
|
// Start watching the executable for updates
|
||||||
|
Loading…
Reference in New Issue
Block a user