Move OpenGL workaround import
OpenGL.GL gets imported in earlyinit already anyways, so we can move everything there.
This commit is contained in:
parent
915cd5f016
commit
9e7f2e470f
@ -200,13 +200,6 @@ def init(args):
|
|||||||
if args.enable_webengine_inspector:
|
if args.enable_webengine_inspector:
|
||||||
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port())
|
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port())
|
||||||
|
|
||||||
# Workaround for a black screen with some setups
|
|
||||||
# https://github.com/spyder-ide/spyder/issues/3226
|
|
||||||
if not os.environ.get('QUTE_NO_OPENGL_WORKAROUND'):
|
|
||||||
# Hide "No OpenGL_accelerate module loaded: ..." message
|
|
||||||
logging.getLogger('OpenGL.acceleratesupport').propagate = False
|
|
||||||
from OpenGL import GL # pylint: disable=unused-variable
|
|
||||||
|
|
||||||
_init_profiles()
|
_init_profiles()
|
||||||
|
|
||||||
# We need to do this here as a WORKAROUND for
|
# We need to do this here as a WORKAROUND for
|
||||||
|
@ -36,6 +36,7 @@ import traceback
|
|||||||
import signal
|
import signal
|
||||||
import importlib
|
import importlib
|
||||||
import datetime
|
import datetime
|
||||||
|
import logging
|
||||||
try:
|
try:
|
||||||
import tkinter
|
import tkinter
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -342,7 +343,12 @@ def check_libraries(backend):
|
|||||||
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine",
|
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine",
|
||||||
webengine=True)
|
webengine=True)
|
||||||
modules['PyQt5.QtOpenGL'] = _missing_str("PyQt5.QtOpenGL")
|
modules['PyQt5.QtOpenGL'] = _missing_str("PyQt5.QtOpenGL")
|
||||||
modules['OpenGL.GL'] = _missing_str("PyOpenGL")
|
# Workaround for a black screen with some setups
|
||||||
|
# https://github.com/spyder-ide/spyder/issues/3226
|
||||||
|
if not os.environ.get('QUTE_NO_OPENGL_WORKAROUND'):
|
||||||
|
# Hide "No OpenGL_accelerate module loaded: ..." message
|
||||||
|
logging.getLogger('OpenGL.acceleratesupport').propagate = False
|
||||||
|
modules['OpenGL.GL'] = _missing_str("PyOpenGL")
|
||||||
else:
|
else:
|
||||||
assert backend == 'webkit'
|
assert backend == 'webkit'
|
||||||
modules['PyQt5.QtWebKit'] = _missing_str("PyQt5.QtWebKit")
|
modules['PyQt5.QtWebKit'] = _missing_str("PyQt5.QtWebKit")
|
||||||
|
Loading…
Reference in New Issue
Block a user