Bug 450672 - Panel drawn with a black tint after commit 745e2c08
Summary: Panel drawn with a black tint after commit 745e2c08
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Panel (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-02-21 21:48 UTC by Luca Beltrame
Modified: 2022-02-23 09:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Panel with the broken rendering (6.95 KB, image/png)
2022-02-21 21:48 UTC, Luca Beltrame
Details
Panel with correct rendering (11.33 KB, image/png)
2022-02-21 21:48 UTC, Luca Beltrame
Details
Detail of the artifacts on the panel (1.76 KB, image/png)
2022-02-21 21:49 UTC, Luca Beltrame
Details
Broken rendering with dialog (panel options) (33.60 KB, image/png)
2022-02-21 21:51 UTC, Luca Beltrame
Details
KWin supporting information (6.59 KB, text/plain)
2022-02-21 21:52 UTC, Luca Beltrame
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2022-02-21 21:48:07 UTC
Created attachment 147017 [details]
Panel with the broken rendering

SUMMARY

After https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1474 landed, panels (and some Plasma dialogs) are drawn with a black tint on X11. 

Reverting 745e2c08  in plasmashell restores the previous behavior (no other changes needed). 

KWin supporting information and screenshots are attached.

STEPS TO REPRODUCE
1.  Start plasmashell with 745e2c08 applied.

OBSERVED RESULT

Panel is drawn with a black tint and has visible artifacts (see screenshots). Some Plasma dialogs too (see screenshots).

EXPECTED RESULT

Panel should be transparent. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  openSUSE Tumbleweed / latest master
(available in About System)
KDE Plasma Version:  latest master
KDE Frameworks Version:  latest master
Qt Version:  latest 5.15 + the full KDE patch set

ADDITIONAL INFORMATION

This problem does not seem to occur on Wayland.
Comment 1 Luca Beltrame 2022-02-21 21:48:57 UTC
Created attachment 147018 [details]
Panel with correct rendering
Comment 2 Luca Beltrame 2022-02-21 21:49:49 UTC
Created attachment 147019 [details]
Detail of the artifacts on the panel
Comment 3 Luca Beltrame 2022-02-21 21:51:19 UTC
Created attachment 147020 [details]
Broken rendering with dialog (panel options)
Comment 4 Luca Beltrame 2022-02-21 21:52:02 UTC
Created attachment 147021 [details]
KWin supporting information
Comment 5 Fushan Wen 2022-02-22 01:24:52 UTC
Also the translucent background seems broken.
Comment 6 Vlad Zahorodnii 2022-02-22 07:04:59 UTC
https://invent.kde.org/plasma/plasma-workspace/-/blob/5824e6362008988f74d07c9fce930e93294b990d/shell/desktopview.cpp#L37 if you change Qt::black to Qt::red, are panel corners red? Do new panels have opaque background?
Comment 7 Luca Beltrame 2022-02-22 13:14:40 UTC
(In reply to Vlad Zahorodnii from comment #6)
> https://invent.kde.org/plasma/plasma-workspace/-/blob/
> 5824e6362008988f74d07c9fce930e93294b990d/shell/desktopview.cpp#L37 if you
> change Qt::black to Qt::red, are panel corners red? Do new panels have
> opaque background?

I'll test the color when I'm home, but I can already tell you that new panels are properly transparent, but their dialogs are still black tinted.
Comment 8 Luca Beltrame 2022-02-22 20:58:59 UTC
(In reply to Luca Beltrame from comment #7)

> I'll test the color when I'm home, but I can already tell you that new
> panels are properly transparent, but their dialogs are still black tinted.

Well, this is weird. The panel stays black-ish when I change the setColor call. (I set it to Qt::red). I have no idea why that single call changes everything still.
Comment 9 Luca Beltrame 2022-02-22 21:07:04 UTC
I also need to rectify what I wrote earlier. It seemed to me that new panels were correct: but I just tested it again and no, new panels appear dark as well. I made sure by clearing all caches before adding one.
Comment 10 Bug Janitor Service 2022-02-23 09:12:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1485
Comment 11 Fushan Wen 2022-02-23 09:25:16 UTC
Git commit 4cd6ec7446b65213448530a64d584b54268a5ef4 by Fushan Wen, on behalf of Vlad Zahorodnii.
Committed on 23/02/2022 at 09:24.
Pushed by fusionfuture into branch 'master'.

Make DesktopView set black clear color only on Wayland

745e2c08289b35ccd007cf436f653a6e92b45ef9 made DesktopView set clear
color to "black" so the compositor could avoid overdraw and thus
optimizing rendering. In the perfect world, such a change would create
no regressions, but for some reason, it made panels lose alpha channel
on X11.

That makes absolutely no any sense. DesktopView and PanelView are two
totally different code paths. So changes in DesktopView should not
affect the PanelView. This looks like a QtXCB bug.

Ideally, we should add workarounds only after finding what creates a
problem, but this one is particularly hard because many people who have
tried to reproduce that issue weren't successful. Somebody who can
reproduce the issue would have to be able to build Qt from source code
and add qDebug()s. These requirements are too steep, thus adding a
platform check seems like the best option at the moment.

M  +6    -1    shell/desktopview.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/4cd6ec7446b65213448530a64d584b54268a5ef4