diff options
Diffstat (limited to 'src/server/mainwindow')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 73fcbaf..62e15d2 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -599,16 +599,19 @@ void MainWindow::reset(bool lock) { _mode = Mode::None; + // Stop server (Clients get stopped on ACK) + if (getClientFromId(_streamingSource) != nullptr) { + getClientFromId(_streamingSource)->stopVncServer(); + } + // Unlock all clients - for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) + for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { if ((*it)->client() != nullptr) { (*it)->client()->lockScreen(lock); (*it)->client()->removeAttention(); } + } - // Stop server (Clients get stopped on ACK) - if (getClientFromId(_streamingSource) != nullptr) - getClientFromId(_streamingSource)->stopVncServer(); } /* @@ -1219,7 +1222,8 @@ void MainWindow::onVncServerStateChange(Client* client) } } // Dont forget to unlock the vnc server (if necesarry) - client->lockScreen(client->desiredProjectionSource() == NO_SOURCE && _mode == Mode::LockedUnicast); + client->lockScreen((client->desiredProjectionSource() == NO_SOURCE && _mode == Mode::LockedUnicast) + || ui->action_Lock->isChecked()); // If this was the current source remember that there is no source anymore and reset mode if (client == getClientFromId(_streamingSource)) { |