Skip to content

Fix broken transparency on Nvidia

The proprietary Nvidia driver apparently doesn't support querying the EGL_TEXTURE_FORMAT using eglQueryWaylandBufferWL.
KWin calls DrmClientBuffer::hasAlphaChannel() which returns false since the buffer's texture format is still set to the default value of zero.
This causes all QtQuick windows to be fully opaque since they seem to be using the EGLStreams buffer path (as opposed to applications like Konsole with working transparency).

This MR tries to work around the issue by defaulting to EGL_TEXTURE_RGBA in case the eglQueryWaylandBufferWL call fails.
Nvidia promised to fix this bug in an upcoming driver release more than two years ago so I think it's reasonable to add a workaround now.
See this comment: https://phabricator.kde.org/D18570?id=50397#434455

This fixes transparent Plasma themes and the black box behind Latte Dock:

before after

(before/after)

BUG: 426464 BUG: 438275

Edited by Severin von Wnuck-Lipinski

Merge request reports

Loading