summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-20 00:09:03 +0200
committerSimon Rettberg2016-10-20 00:09:03 +0200
commit995a47062229e36873aa1e4e860565045d1fbb7e (patch)
treef2d4f4569daa8ac8a1d7ca6cd695f6809ac964f4
parentImplement "Attention" feature (virtual hand-raising) (diff)
parent[server] Remove pointless code relying on defunct tutor ip list (diff)
downloadpvs2-995a47062229e36873aa1e4e860565045d1fbb7e.tar.gz
pvs2-995a47062229e36873aa1e4e860565045d1fbb7e.tar.xz
pvs2-995a47062229e36873aa1e4e860565045d1fbb7e.zip
Merge branch 'master' of openslx.org:pvs2
-rwxr-xr-xsample_configuration/switchBack.sh9
-rwxr-xr-xsample_configuration/switchToManager.sh12
-rw-r--r--src/server/mainwindow/mainwindow.cpp19
-rw-r--r--src/server/mainwindow/mainwindow.h1
4 files changed, 18 insertions, 23 deletions
diff --git a/sample_configuration/switchBack.sh b/sample_configuration/switchBack.sh
index cc2bae9..0fc3039 100755
--- a/sample_configuration/switchBack.sh
+++ b/sample_configuration/switchBack.sh
@@ -1,3 +1,10 @@
#!/bin/bash
+
+# Force vmplayer to desktop 0
+WINDOWS=$(xdotool search --class vmplayer)
+for window in $WINDOWS; do
+ wmctrl -i -r $window -t 0
+done
+
# switch back to desktop 0
-wmctrl -s 0
+wmctrl -s 0
diff --git a/sample_configuration/switchToManager.sh b/sample_configuration/switchToManager.sh
index 86c6704..84f3c37 100755
--- a/sample_configuration/switchToManager.sh
+++ b/sample_configuration/switchToManager.sh
@@ -1,6 +1,14 @@
#!/bin/bash
+
+# make sure vmplayer is really on workspace 0
+WINDOWS=$(xdotool search --class vmplayer)
+for window in $WINDOWS; do
+ wmctrl -i -r $window -t 0
+done
+
# move PVS-Manager to workspace 1 and focus it
wt="PVS2-Manager"
+wmctrl -r "$wt" -t 1
+wmctrl -s 1
+wmctrl -a "$wt"
-wmctrl -r $wt -t 1
-wmctrl -a $wt
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index ded64b9..c716849 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -1213,7 +1213,6 @@ void MainWindow::onClientAuthenticated(Client* client)
disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)));
connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)));
- bool hasActiveTutor = false;
ConnectionFrame *existing = NULL;
for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) {
// qDebug() << "Existing frame ip: " << (*it)->computerId();
@@ -1222,27 +1221,11 @@ void MainWindow::onClientAuthenticated(Client* client)
if ((*it)->computerId() == client->ip()) {
existing = *it;
}
- if ((*it)->isTutor()) {
- if ((*it)->client() != NULL)
- hasActiveTutor = true;
- }
}
-
- bool isTutor = false;
- if (!hasActiveTutor) {
- for (int i = 0; i < _tutorList.size(); i++) {
- // Check if client is possible tutor
- if (client->ip() == _tutorList[i]) {
- isTutor = true;
- break;
- }
- }
- }
// Clients ip already exists, but was not active.
if (existing != NULL) {
// qDebug() << "Should go into this if clause.";
- existing->setTutor(isTutor);
existing->assignClient(client);
tellClientCurrentSituation(client);
updateExamMode();
@@ -1253,8 +1236,6 @@ void MainWindow::onClientAuthenticated(Client* client)
ConnectionFrame *cf = createFrame();
// Move to any free tile
placeFrameInFreeSlot(cf);
- // Set Tutor option
- cf->setTutor(isTutor);
// Assign client instance
cf->assignClient(client);
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h
index 69be1bf..5ecda61 100644
--- a/src/server/mainwindow/mainwindow.h
+++ b/src/server/mainwindow/mainwindow.h
@@ -73,7 +73,6 @@ private:
QList<ConnectionFrame*> _clientFrames;
ListenServer *_listenServer;
DiscoveryListener *_discoveryListener;
- QStringList _tutorList;
QPoint closestFreeSlot(QPoint preferredPixels, ConnectionFrame* toIgnore);
void placeFrameInFreeSlot(ConnectionFrame* frame, QPoint preferred = QPoint(0, 0));