Commit 63ee43b6 authored by Thiago Santini's avatar Thiago Santini

Always focus on the main window when starting

parent e8f4d7bc
......@@ -28,7 +28,6 @@ MainWindow::MainWindow(QWidget *parent) :
setWindowTitle(QString("EyeRecToo v%1").arg(GIT_VERSION));
setWindowIcon(QIcon(":/icons/EyeRecToo.png"));
setupWidget(this, cfg.mainWindowPos, cfg.mainWindowSize, true);
if (!cfg.workingDirectory.isEmpty())
setWorkingDirectory(cfg.workingDirectory);
......@@ -125,6 +124,8 @@ MainWindow::MainWindow(QWidget *parent) :
loadSoundEffect(recStartSound, "rec-start.wav");
loadSoundEffect(recStopSound, "rec-stop.wav");
setupWidget(this, cfg.mainWindowPos, cfg.mainWindowSize, true);
}
MainWindow::~MainWindow()
......@@ -395,6 +396,7 @@ void MainWindow::widgetButtonReact(QMainWindow *window, bool checked)
if (checked) {
window->show();
window->raise();
window->activateWindow();
window->setFocus();
} else
window->hide();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment