summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 7c484bb..3365473 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -1078,11 +1078,14 @@ void MainWindow::onVncServerStateChange(Client* client)
}
}
}
- // If this was the current source remember that there is no source anymore
- if (client == getClientFromId(_streamingSource))
- _streamingSource = NO_SOURCE;
// Dont forget to unlock the vnc server (if necesarry)
client->lockScreen(client->desiredProjectionSource() == NO_SOURCE && _mode == Mode::LockedUnicast);
+
+ // If this was the current source remember that there is no source anymore and reset mode
+ if (client == getClientFromId(_streamingSource)){
+ _streamingSource = NO_SOURCE;
+ _mode = Mode::None;
+ }
}
}