mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
theme.py: Check if we can actually get an Xorg/X11 display
The added exception at least means we don't then segmentation fault in the next line, but it also means we then hit another exception later in the main loop as we try to create the main Tk window. Hopefully the exception messages will be clear enough to the user. closes #500
This commit is contained in:
parent
87d7c823a7
commit
af9c44640f
2
theme.py
2
theme.py
@ -85,6 +85,8 @@ elif platform == 'linux':
|
||||
XQueryTree.argtypes = [POINTER(Display), Window, POINTER(Window), POINTER(Window), POINTER(Window), POINTER(c_uint)]
|
||||
XQueryTree.restype = c_int
|
||||
dpy = xlib.XOpenDisplay(None)
|
||||
if not dpy:
|
||||
raise Exception("Can't find your display, can't continue")
|
||||
motif_wm_hints_property = XInternAtom(dpy, b'_MOTIF_WM_HINTS', False)
|
||||
motif_wm_hints_normal = MotifWmHints(MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS,
|
||||
MWM_FUNC_RESIZE | MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user