fix(linux): set environment variable for rendering of downloads dialog

This works around a problem in webkit2gtk where the download dialog
sometimes only renders a blank screen. Setting the environment variable
seems to help, not only in the cases that the issue describes (with a
NVidia graphics card), but also in my testing in a VM.

Fixes: #12587
Cherry-pick-of: #12616
This commit is contained in:
Eberhard Beilharz 2024-11-04 17:44:22 +01:00
parent c119b8911a
commit 8bff156a68
No known key found for this signature in database
GPG key ID: E9140597606020D3

View file

@ -2,6 +2,7 @@
import argparse
import logging
import os
import sys
import gi
@ -66,6 +67,10 @@ if __name__ == '__main__':
elif args.url:
download_and_install_package(args.url)
else:
# Workaround for bug in webkit2gtk (#12587)
if not 'WEBKIT_DISABLE_DMABUF_RENDERER' in os.environ:
os.environ['WEBKIT_DISABLE_DMABUF_RENDERER'] = '1'
w = ViewInstalledWindow()
try:
w.run()