Use ctypes instead of PyOpenGL for QtWebEngine Nvidia workaround
Fixes #2821
This commit is contained in:
parent
210bc0fd6b
commit
a942613d7f
@ -28,6 +28,8 @@ Breaking changes
|
|||||||
- New dependency on ruamel.yaml; dropped PyYAML dependency.
|
- New dependency on ruamel.yaml; dropped PyYAML dependency.
|
||||||
- The QtWebEngine backend is now used by default if available.
|
- The QtWebEngine backend is now used by default if available.
|
||||||
- New config system which ignores the old config file.
|
- New config system which ignores the old config file.
|
||||||
|
- The depedency on PyOpenGL (when using QtWebEngine) got removed. Note
|
||||||
|
that PyQt5.QtOpenGL is still a depdency.
|
||||||
|
|
||||||
Major changes
|
Major changes
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
|
@ -118,7 +118,6 @@ The following software and libraries are required to run qutebrowser:
|
|||||||
* http://jinja.pocoo.org/[jinja2]
|
* http://jinja.pocoo.org/[jinja2]
|
||||||
* http://pygments.org/[pygments]
|
* http://pygments.org/[pygments]
|
||||||
* http://pyyaml.org/wiki/PyYAML[PyYAML]
|
* http://pyyaml.org/wiki/PyYAML[PyYAML]
|
||||||
* http://pyopengl.sourceforge.net/[PyOpenGL] when using QtWebEngine
|
|
||||||
|
|
||||||
The following libraries are optional:
|
The following libraries are optional:
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ Module attributes:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
import ctypes
|
||||||
|
import ctypes.util
|
||||||
|
|
||||||
from PyQt5.QtGui import QFont
|
from PyQt5.QtGui import QFont
|
||||||
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
|
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile,
|
||||||
@ -199,6 +202,11 @@ 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
|
||||||
|
# https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826
|
||||||
|
if sys.platform == 'linux':
|
||||||
|
ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL)
|
||||||
|
|
||||||
_init_profiles()
|
_init_profiles()
|
||||||
|
|
||||||
# We need to do this here as a WORKAROUND for
|
# We need to do this here as a WORKAROUND for
|
||||||
|
@ -344,12 +344,6 @@ 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")
|
||||||
# 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")
|
||||||
|
@ -186,7 +186,6 @@ def _module_versions():
|
|||||||
('yaml', ['__version__']),
|
('yaml', ['__version__']),
|
||||||
('cssutils', ['__version__']),
|
('cssutils', ['__version__']),
|
||||||
('typing', []),
|
('typing', []),
|
||||||
('OpenGL', ['__version__']),
|
|
||||||
('PyQt5.QtWebEngineWidgets', []),
|
('PyQt5.QtWebEngineWidgets', []),
|
||||||
('PyQt5.QtWebKitWidgets', []),
|
('PyQt5.QtWebKitWidgets', []),
|
||||||
])
|
])
|
||||||
|
@ -7,4 +7,3 @@ MarkupSafe==1.0
|
|||||||
Pygments==2.2.0
|
Pygments==2.2.0
|
||||||
pyPEG2==2.15.2
|
pyPEG2==2.15.2
|
||||||
PyYAML==3.12
|
PyYAML==3.12
|
||||||
PyOpenGL==3.1.0
|
|
||||||
|
@ -495,7 +495,6 @@ class ImportFake:
|
|||||||
('yaml', True),
|
('yaml', True),
|
||||||
('cssutils', True),
|
('cssutils', True),
|
||||||
('typing', True),
|
('typing', True),
|
||||||
('OpenGL', True),
|
|
||||||
('PyQt5.QtWebEngineWidgets', True),
|
('PyQt5.QtWebEngineWidgets', True),
|
||||||
('PyQt5.QtWebKitWidgets', True),
|
('PyQt5.QtWebKitWidgets', True),
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user