summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-05-27 14:34:38 +0200
committerBjörn Hagemeister2014-05-27 14:34:38 +0200
commit2b99384efd2926f6dc2abe29c793113bbb9f804f (patch)
tree1a61ccf4db65d9086b6a3a7bd0e915ef57028999 /src/server/mainwindow/mainwindow.cpp
parentBy pushing reset button, also unlock all currently locked screens. (diff)
downloadpvs2-2b99384efd2926f6dc2abe29c793113bbb9f804f.tar.gz
pvs2-2b99384efd2926f6dc2abe29c793113bbb9f804f.tar.xz
pvs2-2b99384efd2926f6dc2abe29c793113bbb9f804f.zip
Put the clients adaption to current class room situation into method.
Now clients who where just inactive also follow immediatly the actual actions.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index a3f77e4..99339ba 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -257,6 +257,25 @@ void MainWindow::savePosition(ConnectionFrame *cf)
settings.endGroup();
}
+/***************************************************************************//**
+ * Tells the new client the current situation in class room.
+ * Set the specific parameters like projection source or lock screen.
+ * @param client
+ */
+void MainWindow::tellClientCurrentSituation(Client* client)
+{
+ // If clients are currently locked, tell this new client
+ if (ui->action_Lock->isChecked())
+ client->lockScreen(true);
+
+ if (_mode == Mode::Broadcast){
+ _watchers.insert(client->id(), client);
+ client->startVncClient(_streamingSource);
+ }
+ else if (_mode == Mode::LockedMulticast)
+ client->lockScreen(true);
+}
+
/*
* Overridden methods
*/
@@ -792,6 +811,7 @@ void MainWindow::onClientAuthenticated(Client* client)
{
existing->setTutor(isTutor);
existing->assignClient(client);
+ tellClientCurrentSituation(client);
return;
}
// New one, create
@@ -828,16 +848,7 @@ void MainWindow::onClientAuthenticated(Client* client)
// Assign client instance
cf->assignClient(client);
- // If clients are currently locked, tell this new client
- if (ui->action_Lock->isChecked())
- client->lockScreen(true);
-
- if (_mode == Mode::Broadcast){
- _watchers.insert(client->id(), client);
- client->startVncClient(_streamingSource);
- }
- else if (_mode == Mode::LockedMulticast)
- client->lockScreen(true);
+ tellClientCurrentSituation(client);
}
/***************************************************************************//**