File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,12 @@ def __init__(self):
337
337
self .root = self .xlib .XDefaultRootWindow (self .display , self .screen )
338
338
339
339
def _set_argtypes (self ):
340
- ''' Functions arguments. '''
340
+ ''' Functions arguments.
341
+
342
+ Curiously, if we set up self.xlib.XGetPixel.argtypes,
343
+ the entire process takes twice more time.
344
+ So, no need to waste this precious time :)
345
+ '''
341
346
342
347
self .xlib .XOpenDisplay .argtypes = [c_char_p ]
343
348
self .xlib .XDefaultScreen .argtypes = [POINTER (Display )]
@@ -363,7 +368,12 @@ def _set_argtypes(self):
363
368
self .xrandr .XRRFreeCrtcInfo .argtypes = [POINTER (XRRCrtcInfo )]
364
369
365
370
def _set_restypes (self ):
366
- ''' Functions return type. '''
371
+ ''' Functions return type.
372
+
373
+ Curiously, if we set up self.xlib.XGetPixel.restype,
374
+ the entire process takes twice more time.
375
+ So, no need to waste this precious time :)
376
+ '''
367
377
368
378
self .xlib .XOpenDisplay .restype = POINTER (Display )
369
379
self .xlib .XDefaultScreen .restype = c_int
You can’t perform that action at this time.
0 commit comments