Commit 4fa725ef authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix overdraw on Wayland

Since the DesktopView has "transparent" clear color, it will allocate a
buffer with an alpha channel and QtWayland won't be able to set an
opaque region. This change sets the clear color of DesktopView to "black"
so overdraw can be fixed in kwin and to improve render performance on
wayland.

Cherry picked from commit 745e2c08,
except that it also adds a platform check. Some people reported that
setColor(Qt::black) in DesktopView breaks panel translucency on X11.
A few of plasma developers have tried to reproduce that issue, but
couldn't. It needs more investigation. In meanwhile, let's set clear
color to black only on Wayland.
parent 3520cd5a
Pipeline #140618 passed with stage
in 5 minutes and 51 seconds
......@@ -34,6 +34,11 @@ DesktopView::DesktopView(Plasma::Corona *corona, QScreen *targetScreen)
, m_shellSurface(nullptr)
{
QObject::setParent(corona);
// Some people reported that setColor(Qt::black) breaks panel translucency on X11. Needs more investigation.
if (KWindowSystem::isPlatformWayland()) {
setColor(Qt::black);
}
if (targetScreen) {
setScreenToFollow(targetScreen);
setScreen(targetScreen);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment