Enable libGL workaround on any system where it's available

Fixes #3772
This commit is contained in:
Florian Bruhin 2018-04-23 11:20:56 +02:00
parent 178eeaed0d
commit 6640768860
2 changed files with 5 additions and 2 deletions

View File

@ -79,6 +79,8 @@ Fixed
- Window ID 0 is now excluded properly from `:tab-take` completion.
- A rare crash when cancelling a download has been fixed.
- The Makefile (intended for packagers) now supports `PREFIX` properly.
- The workaround for a black window with Nvidia graphics is now enabled on
non-Linux systems (like FreeBSD) as well.
v1.2.1
------

View File

@ -166,8 +166,9 @@ def _nvidia_shader_workaround():
See https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826
"""
assert objects.backend == usertypes.Backend.QtWebEngine, objects.backend
if utils.is_linux:
ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL)
libgl = ctypes.util.find_library("GL")
if libgl is not None:
ctypes.CDLL(libgl, mode=ctypes.RTLD_GLOBAL)
def _handle_nouveau_graphics():