Allow to force software rendering with wayland on Qt 5.11
Closes #2932 (hopefully for the last time)
This commit is contained in:
parent
88f2873a79
commit
6e954a1596
@ -40,6 +40,8 @@ Changed
|
|||||||
- The `qt.force_software_rendering` setting changed from a boolean to taking
|
- The `qt.force_software_rendering` setting changed from a boolean to taking
|
||||||
different values (`software-opengl`, `qt-quick` and `chromium`) for different
|
different values (`software-opengl`, `qt-quick` and `chromium`) for different
|
||||||
kinds of software rendering workarounds.
|
kinds of software rendering workarounds.
|
||||||
|
- On Qt 5.11, using wayland with QtWebEngine is now possible when using
|
||||||
|
software rendering.
|
||||||
|
|
||||||
v1.3.2 (unreleased)
|
v1.3.2 (unreleased)
|
||||||
-------------------
|
-------------------
|
||||||
|
@ -213,33 +213,41 @@ def _handle_wayland():
|
|||||||
if platform not in ['wayland', 'wayland-egl']:
|
if platform not in ['wayland', 'wayland-egl']:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
has_qt511 = qtutils.version_check('5.11', compiled=False)
|
||||||
|
if has_qt511 and config.val.qt.force_software_rendering == 'chromium':
|
||||||
|
return
|
||||||
|
|
||||||
|
buttons = []
|
||||||
|
text = "<p>You can work around this in one of the following ways:</p>"
|
||||||
|
|
||||||
if 'DISPLAY' in os.environ:
|
if 'DISPLAY' in os.environ:
|
||||||
# XWayland is available, but QT_QPA_PLATFORM=wayland is set
|
# XWayland is available, but QT_QPA_PLATFORM=wayland is set
|
||||||
button = _Button("Force XWayland", 'qt.force_platform', 'xcb')
|
buttons.append(_Button("Force XWayland", 'qt.force_platform', 'xcb'))
|
||||||
_show_dialog(
|
text += ("<p><b>Force Qt to use XWayland</b></p>"
|
||||||
backend=usertypes.Backend.QtWebEngine,
|
|
||||||
because="you're using Wayland",
|
|
||||||
text="<p>There are two ways to fix this:</p>"
|
|
||||||
"<p><b>Force Qt to use XWayland</b></p>"
|
|
||||||
"<p>This allows you to use the newer QtWebEngine backend "
|
"<p>This allows you to use the newer QtWebEngine backend "
|
||||||
"(based on Chromium). "
|
"(based on Chromium). "
|
||||||
"This sets the <i>qt.force_platform = 'xcb'</i> option "
|
"This sets the <i>qt.force_platform = 'xcb'</i> option "
|
||||||
"(if you have a <i>config.py</i> file, you'll need to set "
|
"(if you have a <i>config.py</i> file, you'll need to set "
|
||||||
"this manually).</p>",
|
"this manually).</p>")
|
||||||
buttons=[button],
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# XWayland is unavailable
|
text.append("<p><b>Set up XWayland</b></p>"
|
||||||
_show_dialog(
|
"<p>This allows you to use the newer QtWebEngine backend "
|
||||||
backend=usertypes.Backend.QtWebEngine,
|
"(based on Chromium). ")
|
||||||
because="you're using Wayland without XWayland",
|
|
||||||
text="<p>There are two ways to fix this:</p>"
|
|
||||||
"<p><b>Set up XWayland</b></p>"
|
|
||||||
"<p>This allows you to use the newer QtWebEngine backend "
|
|
||||||
"(based on Chromium). "
|
|
||||||
)
|
|
||||||
|
|
||||||
raise utils.Unreachable
|
if has_qt511:
|
||||||
|
buttons.append(_Button("Force software rendering",
|
||||||
|
'qt.force_software_rendering',
|
||||||
|
'chromium'))
|
||||||
|
text += ("<p><b>Forcing software rendering</b></p>"
|
||||||
|
"<p>This allows you to use the newer QtWebEngine backend "
|
||||||
|
"(based on Chromium) but could have noticeable performance "
|
||||||
|
"impact (depending on your hardware). This sets the "
|
||||||
|
"<i>qt.force_software_rendering = 'chromium'</i> option "
|
||||||
|
"(if you have a <i>config.py</i> file, you'll need to set "
|
||||||
|
"this manually).</p>")
|
||||||
|
|
||||||
|
_show_dialog(backend=usertypes.Backend.QtWebEngine,
|
||||||
|
because="you're using Wayland", text=text, buttons=buttons)
|
||||||
|
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
||||||
|
Loading…
Reference in New Issue
Block a user