diff options
Diffstat (limited to 'src/server/mainwindow')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index a984173..2eab581 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -210,12 +210,16 @@ void MainWindow::clientCountChanged() _examModeLabel->setFixedHeight(e ? 400 : 0); if (_lastClientCount != clientCount) { + // Client count actually changed if (clientCount == 0) { + // Last client must have disconnected, enable screen saver again ScreenSaver::allowSaverAndStandby(true); - } else { + } else if (_lastClientCount == 0) { + // We didn't have a client before, but now we do, disable screen saver ScreenSaver::forceUnlockAndScreenOn(); ScreenSaver::allowSaverAndStandby(false); } + // Remember client count _lastClientCount = clientCount; } } |