summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qutebrowser/browser/webengine/webenginesettings.py7
-rw-r--r--qutebrowser/misc/earlyinit.py8
2 files changed, 7 insertions, 8 deletions
diff --git a/qutebrowser/browser/webengine/webenginesettings.py b/qutebrowser/browser/webengine/webenginesettings.py
index 493a2a687..936c42033 100644
--- a/qutebrowser/browser/webengine/webenginesettings.py
+++ b/qutebrowser/browser/webengine/webenginesettings.py
@@ -200,13 +200,6 @@ def init(args):
if args.enable_webengine_inspector:
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()
# We need to do this here as a WORKAROUND for
diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py
index f5145e015..59cf6a6bf 100644
--- a/qutebrowser/misc/earlyinit.py
+++ b/qutebrowser/misc/earlyinit.py
@@ -36,6 +36,7 @@ import traceback
import signal
import importlib
import datetime
+import logging
try:
import tkinter
except ImportError:
@@ -342,7 +343,12 @@ def check_libraries(backend):
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine",
webengine=True)
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:
assert backend == 'webkit'
modules['PyQt5.QtWebKit'] = _missing_str("PyQt5.QtWebKit")