diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 9 | ||||
| -rw-r--r-- | src/server/net/client.h | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 67d88d0..1d9e565 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -719,6 +719,7 @@ void MainWindow::onVncServerStateChange(Client* client) msg.setField("HOST", client->ip()); msg.setField("PORT", QString::number(client->vncPort())); msg.setField("ROPASS", client->vncRoPass()); + msg.setField("CLIENTID", QString::number(client->id())); msg.setField("CAPTION", client->name() + " @ " + client->host()); for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { @@ -775,15 +776,15 @@ void MainWindow::onVncClientStateChange(Client* client) for (QList<ConnectionFrame*>::iterator it(_clientFrames.begin()); it != _clientFrames.end(); ++it) { Client *c = (**it).client(); - if (c == NULL || c == client) + if (c == NULL) continue; - if (c->currentProjectionSource() == client->currentProjectionSource()) + if (c->id() == client->currentProjectionSource()) + server = c; + if (c != client && c->currentProjectionSource() == client->currentProjectionSource()) { inUse = true; break; } - if (c->id() == client->currentProjectionSource()) - server = c; } // 3. kill server if applicable if (!inUse && server != NULL) diff --git a/src/server/net/client.h b/src/server/net/client.h index c90c884..2cdfb23 100644 --- a/src/server/net/client.h +++ b/src/server/net/client.h @@ -83,7 +83,6 @@ public: inline const bool isProjectionSource() const { return _isProjectionSource; } inline void setProjectionSource(bool enable) { _isProjectionSource = enable; } inline const ClientId currentProjectionSource() const { return _currentProjectionSource; } - inline void setCurrentProjectionSource(ClientId source) { _currentProjectionSource = source; } void startVncServer(); void stopVncServer(); void stopVncClient(); |
