summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorsr2013-02-05 19:22:13 +0100
committersr2013-02-05 19:22:13 +0100
commitb2163a15224b91866d394cf310c393cc49b7f5b4 (patch)
treeb64ef69bdfec663e6374c1a8ce4cb920bbb64b70 /src/server/mainwindow/mainwindow.cpp
parent... (diff)
downloadpvs2-b2163a15224b91866d394cf310c393cc49b7f5b4.tar.gz
pvs2-b2163a15224b91866d394cf310c393cc49b7f5b4.tar.xz
pvs2-b2163a15224b91866d394cf310c393cc49b7f5b4.zip
...
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 0441f1d..6e312e6 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -630,7 +630,7 @@ void MainWindow::onClientAuthenticated(Client* client)
{
disconnect(client, SIGNAL(authenticated(Client*)), this, SLOT(onClientAuthenticated(Client*)));
connect(client, SIGNAL(vncServerStateChange(Client*)), this, SLOT(onVncServerStateChange(Client*)), Qt::QueuedConnection);
- connect(client, SIGNAL(vncClientStateChange(Client*)), this, SLOT(onVncClientStateChange(Client*)), Qt::QueuedConnection);
+ connect(client, SIGNAL(vncClientStateChange(Client*, ClientId)), this, SLOT(onVncClientStateChange(Client*, ClientId)), Qt::QueuedConnection);
bool hasActiveTutor = false;
ConnectionFrame *deadTutor = NULL;
bool anyClient = false;
@@ -774,13 +774,12 @@ void MainWindow::onVncServerStateChange(Client* client)
}
}
-void MainWindow::onVncClientStateChange(Client* client)
+void MainWindow::onVncClientStateChange(Client* client, ClientId lastProjectionSource)
{
if (!isValidClient(client)) // Check here because this slot is connected queued
return;
- // If the client started projection, ignore event. Also if
- // the source is not known (anymore), we cannot do anything meaningful here
- if (client->isActiveVncClient() || client->currentProjectionSource() == 0)
+ // If last source is not known or not existent, we cannot do anything meaningful here
+ if (lastProjectionSource == 0)
return;
// Client is not a vnc client anymore. Check if the VNC server it was (supposedly) connected
// to is still running, and kill it if there are no more clients connected to it.
@@ -794,9 +793,9 @@ void MainWindow::onVncClientStateChange(Client* client)
Client *c = (**it).client();
if (c == NULL)
continue;
- if (c->id() == client->currentProjectionSource())
+ if (c->id() == lastProjectionSource)
server = c;
- if (c != client && c->currentProjectionSource() == client->currentProjectionSource())
+ if (c != client && c->currentProjectionSource() == lastProjectionSource)
{
inUse = true;
break;