diff options
Diffstat (limited to '')
-rw-r--r-- | src/blueshift_randr.pyx | 6 | ||||
-rw-r--r-- | src/blueshift_vidmode.pyx | 6 | ||||
-rw-r--r-- | src/monitor.py | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/blueshift_randr.pyx b/src/blueshift_randr.pyx index 756ea73..e845f65 100644 --- a/src/blueshift_randr.pyx +++ b/src/blueshift_randr.pyx @@ -44,9 +44,9 @@ def randr_open(int use_screen, display): ''' Start stage of colour curve control - @param use_screen The screen to use - @param display:str? The display to use, `None` for the current - @return :int Zero on success + @param use_screen The screen to use + @param display:bytes? The display to use, `None` for the current + @return :int Zero on success ''' cdef char* display_ = NULL if display is not None: diff --git a/src/blueshift_vidmode.pyx b/src/blueshift_vidmode.pyx index e4262d7..7ad7a4c 100644 --- a/src/blueshift_vidmode.pyx +++ b/src/blueshift_vidmode.pyx @@ -50,9 +50,9 @@ def vidmode_open(int use_screen, display): ''' Start stage of colour curve control - @param use_screen The screen to use - @param display:str? The display to use, `None` for the current - @return :bool Whether call was successful + @param use_screen The screen to use + @param display:bytes? The display to use, `None` for the current + @return :bool Whether call was successful ''' global vidmode_gamma_size cdef char* display_ = NULL diff --git a/src/monitor.py b/src/monitor.py index 84be9c9..e58836b 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -93,7 +93,7 @@ def randr_get(crtc = 0, screen = 0, display = None): if randr_opened is not None: randr_close() # Open RandR connection - if randr_open(screen, display) == 0: + if randr_open(screen, display if display is None else display.encode('utf-8')) == 0: randr_opened = (screen, display) else: raise Exception('Cannot open RandR connection') @@ -118,7 +118,7 @@ def vidmode_get(crtc = 0, screen = 0, display = None): if vidmode_opened is not None: vidmode_close() # Open vidmode connection - if vidmode_open(screen, display): + if vidmode_open(screen, display if display is None else display.encode('utf-8')): vidmode_opened = (screen, display) else: raise Exception('Cannot open vidmode connection') @@ -162,7 +162,7 @@ def randr(*crtcs, screen = 0, display = None): if randr_opened is not None: randr_close() # Open RandR connection - if randr_open(screen, display) == 0: + if randr_open(screen, display if display is None else display.encode('utf-8')) == 0: randr_opened = (screen, display) else: raise Exception('Cannot open RandR connection') @@ -195,7 +195,7 @@ def vidmode(*crtcs, screen = 0, display = None): if vidmode_opened is not None: vidmode_close() # Open vidmode connection - if vidmode_open(screen, display): + if vidmode_open(screen, display if display is None else display.encode('utf-8')): vidmode_opened = (screen, display) else: raise Exception('Cannot open vidmode connection') |