Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use ctypes instead of PyOpenGL for QtWebEngine Nvidia workaround
- Loading branch information
|
@@ -28,6 +28,8 @@ Breaking changes |
|
|
- New dependency on ruamel.yaml; dropped PyYAML dependency. |
|
|
- The QtWebEngine backend is now used by default if available. |
|
|
- 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 |
|
|
~~~~~~~~~~~~~ |
|
|
|
@@ -118,7 +118,6 @@ The following software and libraries are required to run qutebrowser: |
|
|
* http://jinja.pocoo.org/[jinja2] |
|
|
* http://pygments.org/[pygments] |
|
|
* http://pyyaml.org/wiki/PyYAML[PyYAML] |
|
|
* http://pyopengl.sourceforge.net/[PyOpenGL] when using QtWebEngine |
|
|
|
|
|
The following libraries are optional: |
|
|
|
|
|
|
@@ -28,6 +28,9 @@ |
|
|
""" |
|
|
|
|
|
import os |
|
|
import sys |
|
|
import ctypes |
|
|
import ctypes.util |
|
|
|
|
|
from PyQt5.QtGui import QFont |
|
|
from PyQt5.QtWebEngineWidgets import (QWebEngineSettings, QWebEngineProfile, |
|
@@ -199,6 +202,11 @@ def init(args): |
|
|
if args.enable_webengine_inspector: |
|
|
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() |
|
|
|
|
|
# We need to do this here as a WORKAROUND for |
|
|
|
@@ -344,12 +344,6 @@ def check_libraries(backend): |
|
|
modules['PyQt5.QtWebEngineWidgets'] = _missing_str("QtWebEngine", |
|
|
webengine=True) |
|
|
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: |
|
|
assert backend == 'webkit' |
|
|
modules['PyQt5.QtWebKit'] = _missing_str("PyQt5.QtWebKit") |
|
|
|
@@ -186,7 +186,6 @@ def _module_versions(): |
|
|
('yaml', ['__version__']), |
|
|
('cssutils', ['__version__']), |
|
|
('typing', []), |
|
|
('OpenGL', ['__version__']), |
|
|
('PyQt5.QtWebEngineWidgets', []), |
|
|
('PyQt5.QtWebKitWidgets', []), |
|
|
]) |
|
|
|
@@ -7,4 +7,3 @@ MarkupSafe==1.0 |
|
|
Pygments==2.2.0 |
|
|
pyPEG2==2.15.2 |
|
|
PyYAML==3.12 |
|
|
PyOpenGL==3.1.0 |
|
@@ -495,7 +495,6 @@ def __init__(self): |
|
|
('yaml', True), |
|
|
('cssutils', True), |
|
|
('typing', True), |
|
|
('OpenGL', True), |
|
|
('PyQt5.QtWebEngineWidgets', True), |
|
|
('PyQt5.QtWebKitWidgets', True), |
|
|
]) |
|
|