diff options
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 11 | ||||
-rw-r--r-- | src/server/net/client.cpp | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index f59d040..e50efa7 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -546,9 +546,9 @@ void MainWindow::updateContextButtonStates() ui->action_SetAsTutor->setEnabled(somethingSelected); ui->action_LockSingle->setEnabled(selectedOnline && selected != tutor); // Don't allow projection to self - ui->action_StudentToTutorExclusive->setEnabled(somethingSelected && selected != tutor && tutorOnline); - ui->action_StudentToTutor->setEnabled(somethingSelected && selected != tutor && tutorOnline); - ui->action_TutorToStudent->setEnabled(somethingSelected && selected != tutor && tutorOnline); + ui->action_StudentToTutorExclusive->setEnabled(selectedOnline && tutorOnline && selected != tutor); + ui->action_StudentToTutor->setEnabled(selectedOnline && tutorOnline && selected != tutor); + ui->action_TutorToStudent->setEnabled(selectedOnline && tutorOnline && selected != tutor); // Only allow tutor broadcast if they're online ui->action_TutorToAll->setEnabled(tutorOnline); } @@ -1175,9 +1175,8 @@ void MainWindow::onVncServerStateChange(Client* client) if (frame->client()->desiredProjectionSource() == client->id()) { frame->client()->startVncClient(client); client->lockScreen(false); - } - if (frame->client()->desiredProjectionSource() == NO_SOURCE && _mode == Mode::LockedUnicast) { - frame->client()->lockScreen(true); + } else { + frame->client()->lockScreen(frame->client()->desiredProjectionSource() == NO_SOURCE && _mode == Mode::LockedUnicast); } } // Dont forget to unlock the vnc server diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp index e11a3e7..977eb84 100644 --- a/src/server/net/client.cpp +++ b/src/server/net/client.cpp @@ -273,7 +273,7 @@ void Client::stopVncServer() void Client::startVncClient(const Client * const to) { - if (_projectionSource == to->_id) + if (_isActiveVncClient && _projectionSource == to->_id) return; // Already watching given target, do nothing NetworkMessage msg; msg.setField(_ID, _VNCCLIENT); |