mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:Improve X server detection
This commit is contained in:
parent
c01b8454f5
commit
1f349f330e
@ -538,7 +538,7 @@ class Application(QApplication):
|
|||||||
|
|
||||||
def is_ok_to_use_qt():
|
def is_ok_to_use_qt():
|
||||||
global gui_thread
|
global gui_thread
|
||||||
if islinux and os.environ.get('DISPLAY', None) is None:
|
if islinux and ':' in os.environ.get('DISPLAY', ''):
|
||||||
return False
|
return False
|
||||||
if QApplication.instance() is None:
|
if QApplication.instance() is None:
|
||||||
QApplication([])
|
QApplication([])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user