Revert "Windows: Remove locked screen detection"

This reverts commit 05307bd609
This commit is contained in:
Philipp Hörist 2018-09-06 21:38:41 +02:00
parent 05307bd609
commit 3a16ccb4d4
1 changed files with 7 additions and 0 deletions

View File

@ -168,6 +168,13 @@ class WindowsIdleMonitor:
info = self.SystemParametersInfo(0x72, 0, ctypes.byref(saver_runing), 0) info = self.SystemParametersInfo(0x72, 0, ctypes.byref(saver_runing), 0)
if info and saver_runing.value: if info and saver_runing.value:
return True return True
# Check if Screen is locked
desk = self.OpenInputDesktop(0, False, 0)
if not desk:
return True
self.CloseDesktop(desk)
return False return False