diff --git a/ChangeLog b/ChangeLog index 33d7a7734..0d12d9d23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,7 @@ Bug fixes: - #7011 Fix language synchronisation checkbox spelling - #7013 Wrong connection pop up appears if the user connects using a domain name which is assigned to list of IP's - #7014 Temporary disable language sync logic +- #7015 Fix Windows service not starting up after sleep Enhancements: - #6954 Move language selection to advanced section diff --git a/src/gui/src/MainWindow.cpp b/src/gui/src/MainWindow.cpp index 850007254..3166e5c7a 100644 --- a/src/gui/src/MainWindow.cpp +++ b/src/gui/src/MainWindow.cpp @@ -139,6 +139,7 @@ MainWindow::MainWindow (AppConfig& appConfig, connect(&m_IpcClient, SIGNAL(readLogLine(const QString&)), this, SLOT(appendLogRaw(const QString&))); connect(&m_IpcClient, SIGNAL(errorMessage(const QString&)), this, SLOT(appendLogError(const QString&))); connect(&m_IpcClient, SIGNAL(infoMessage(const QString&)), this, SLOT(appendLogInfo(const QString&))); + connect(&m_IpcClient, SIGNAL(readLogLine(const QString&)), this, SLOT(handleIdleService(const QString&))); m_IpcClient.connectToHost(); #endif @@ -246,7 +247,7 @@ void MainWindow::open() // only start if user has previously started. this stops the gui from // auto hiding before the user has configured synergy (which of course // confuses first time users, who think synergy has crashed). - if (appConfig().startedBefore() && appConfig().processMode() == Desktop) { + if (appConfig().startedBefore() && appConfig().processMode() == ProcessMode::Desktop) { startSynergy(); } } @@ -435,6 +436,16 @@ void MainWindow::appendLogRaw(const QString& text) } } +void MainWindow::handleIdleService(const QString& text) +{ + foreach(QString line, text.split(QRegExp("\r|\n|\r\n"))) { + // only start if there is no active service running + if (!line.isEmpty() && line.contains("service status: idle") && appConfig().startedBefore()) { + startSynergy(); + } + } +} + void MainWindow::updateFromLogLine(const QString &line) { // TODO: This shouldn't be updating from log needs a better way of doing this diff --git a/src/gui/src/MainWindow.h b/src/gui/src/MainWindow.h index 7980d2ef2..f21775da4 100644 --- a/src/gui/src/MainWindow.h +++ b/src/gui/src/MainWindow.h @@ -144,6 +144,7 @@ public slots: void startSynergy(); void retryStart(); // If the connection failed this will retry a startSynergy void actionStart(); + void handleIdleService(const QString& text); protected slots: void updateLocalFingerprint();