File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -486,6 +486,7 @@ def __regrab(changes):
486486 __keybinds [new ] = __keybinds [old ]
487487 del __keybinds [old ]
488488
489- update_keyboard_mapping (None )
490- event .connect ('MappingNotify' , None , update_keyboard_mapping )
489+ if conn is not None :
490+ update_keyboard_mapping (None )
491+ event .connect ('MappingNotify' , None , update_keyboard_mapping )
491492
Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ def build_atom_cache(atoms):
159159 """
160160 global __atom_cache , __atom_nm_cache
161161
162+ if conn is None :
163+ return
164+
162165 for atom in atoms :
163166 __atom_cache [atom ] = __get_atom_cookie (atom , only_if_exists = False )
164167 for atom in __atom_cache :
Original file line number Diff line number Diff line change 1212
1313from xpybutil import conn
1414
15- ext = conn (xcb .xinerama .key )
15+ ext = None
16+ if conn is not None :
17+ ext = conn (xcb .xinerama .key )
1618
1719def get_monitors ():
1820 '''
You can’t perform that action at this time.
0 commit comments