From 9ddaabf901f6c31f8d577410182f50dc1c37f955 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 12 Jul 2018 16:29:18 +0200 Subject: [server] Fix (=implement) tracking of client's projection source We never stored the current projection source id in the according field of class Client, breaking intended functionality when cancelling projection. --- src/server/net/client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/net/client.cpp b/src/server/net/client.cpp index 7f94983..0dd8783 100644 --- a/src/server/net/client.cpp +++ b/src/server/net/client.cpp @@ -184,10 +184,11 @@ void Client::handleMsg() emit stateChanged(); } else if (id == _VNCCLIENT) { // Client tells us that it started or stopped displaying a remote screen via VNC - const int projectionSource = (int)_fromClient.getFieldString("CLIENTID").toInt(); + const int projectionSource = _fromClient.getFieldString("CLIENTID").toInt(); if (_fromClient.getFieldString("ENABLED").toInt() != 0) { qDebug() << "Client " << _name << " started its VNC client (watching " << projectionSource << ")"; _isActiveVncClient = true; + _projectionSource = projectionSource; emit vncClientStateChange(this); } else { qDebug() << "Client " << _name << " stopped its VNC client (watched " << projectionSource << ")"; -- cgit v1.2.3-55-g7522