diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 | ||||
-rw-r--r-- | src/main_qmladaptor.h | 1 | ||||
-rw-r--r-- | src/session.cpp | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index b29c58e..96fcab2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -48,6 +48,11 @@ int main(int argc, char *argv[]) { engine.rootObjects().takeFirst(), SLOT(minimizeWindow())); + QObject::connect(main_gui.data(), + SIGNAL(showWindow()), + engine.rootObjects().takeFirst(), + SLOT(showWindow())); + // We don't want users to have multiple instances of this app running QString tmpDirPath = QDir::tempPath() + "/rwa"; QString tmpFilePath = tmpDirPath + "/remote-support-desktop-application-prevent-multiple-instances.lock"; diff --git a/src/main_qmladaptor.h b/src/main_qmladaptor.h index eb88b3a..5cf2c9a 100644 --- a/src/main_qmladaptor.h +++ b/src/main_qmladaptor.h @@ -41,6 +41,7 @@ signals: void messageDialogIconChanged(int iconindex); void minimizeWindow(); + void showWindow(); void onConnectButtonClick(bool checked); diff --git a/src/session.cpp b/src/session.cpp index 92ec5fc..eefa337 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -88,15 +88,20 @@ void Session::setStatus(QString status) { // Clear current variables this->init_vars(); _main_gui->setStatusIndicator(true, QColor(255, 0, 0, 127)); + + emit _main_gui->showWindow(); } else if (status == "stopped") { /* Session is stopped */ guiString = tr("Remote Support session was stopped"); // Clear current variables this->init_vars(); + + emit _main_gui->showWindow(); } else if (status == "active") { /* Partner is connected */ if (!_minimizedBefore) { + qDebug() << "Minimizing window now..."; emit _main_gui->minimizeWindow(); _minimizedBefore = true; } |