Philipp Hörist pushed to branch master at gajim / gajim

Commits:
7040ea6b by Philipp Hörist at 2018-05-21T02:39:29+02:00
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

- - - - -


1 changed file:

- gajim/common/idle.py


Changes:

=====================================
gajim/common/idle.py
=====================================
--- a/gajim/common/idle.py
+++ b/gajim/common/idle.py
@@ -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)]
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/7040ea6b2ea7cbee1cab8d58a61185b268c0dd00

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/7040ea6b2ea7cbee1cab8d58a61185b268c0dd00
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to