Skip to content
Snippets Groups Projects
Commit 7040ea6b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Move module calls into init

On Linux ctypes has not attr windll, move it into the __init__()
so it does not get evaluatet on module import
parent c5df74c5
No related branches found
No related tags found
No related merge requests found
......@@ -145,14 +145,13 @@ class XssIdleMonitor:
class WindowsIdleMonitor:
OpenInputDesktop = ctypes.windll.user32.OpenInputDesktop
CloseDesktop = ctypes.windll.user32.CloseDesktop
SystemParametersInfo = ctypes.windll.user32.SystemParametersInfoW
GetTickCount = ctypes.windll.kernel32.GetTickCount
GetLastInputInfo = ctypes.windll.user32.GetLastInputInfo
def __init__(self):
self.OpenInputDesktop = ctypes.windll.user32.OpenInputDesktop
self.CloseDesktop = ctypes.windll.user32.CloseDesktop
self.SystemParametersInfo = ctypes.windll.user32.SystemParametersInfoW
self.GetTickCount = ctypes.windll.kernel32.GetTickCount
self.GetLastInputInfo = ctypes.windll.user32.GetLastInputInfo
class LASTINPUTINFO(ctypes.Structure):
_fields_ = [('cbSize', ctypes.c_uint), ('dwTime', ctypes.c_uint)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment