Bug 467064

Summary: Transparency in menus stops working after launching certain apps
Product: [Plasma] plasmashell Reporter: David <david.cortes.rivera>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: REPORTED ---    
Severity: normal CC: kde, nate, niccolo.venerandi
Priority: NOR    
Version: 5.27.2   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kde_transparent_menu
kde_transparent_menu_breaks

Description David 2023-03-08 16:44:22 UTC
Created attachment 157119 [details]
kde_transparent_menu

SUMMARY
Some transparent menus like the po-up when clicking the clock or the application launcher will stop being transparent after certain apps are launched.

STEPS TO REPRODUCE
1. Go to System Settings -> Workspace Behavior -> Desktop Effects -> untick "Background Contrast" and "Blur".
2. Click the applications launcher icon (bottom-left corner in the panel). Notice that it is transparent.
3. Launch any of the following apps: web browsers, mail clients, kcolourpaint.
4. Close said app.
5. Open the applications launcher again.

OBSERVED RESULT
It's not transparent anymore.

EXPECTED RESULT
Should be transparent. See attached pictures for before/after.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-6-amd64 (64-bit)
Graphics Platform: X11
Processors: 20 × 12th Gen Intel® Core™ i7-12700H
Memory: 62.5 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: SLIMBOOK
Product Name: Executive

ADDITIONAL INFORMATION
Comment 1 David 2023-03-08 16:44:59 UTC
Created attachment 157120 [details]
kde_transparent_menu_breaks

And this is a screenshot taken after launching one of said apps.
Comment 2 David 2023-03-08 17:17:36 UTC
Weirdest thing here: it will keep working correctly if before opening one of the offending apps, I first switch virtual desktops back and forth.
Comment 3 David 2023-03-08 17:22:11 UTC
Another comment: I think this bug only happens when setting an env. variable "GTK_USE_PORTAL=1".
Comment 4 David 2023-03-08 17:44:24 UTC
Some observations from further testing:
- This only affects pop-ups that spawn out of a panel - e.g. application launcher, clock/calendar pop-up; but not things that spawn from elsewhere like window switcher effect, Ctrl+Alt+Del dialog, or the translucency desktop effect when moving windows if activated or other similar situations that trigger a transparency event.
- The GTK_USE_PORTAL setting had actually no effect, it was just random chance.
- The bug disappears if I set the panel itself to be translucent (right click -> Enter Edit Mode -> More Options -> Opacity -> Translucent) (my usual setting is "Opaque").
Comment 5 Nate Graham 2023-03-13 18:03:24 UTC
1. Are any of the windows for those apps touching your Panel/taskbar when this happens?
2. Are you able to force the panel and its popups to always be opaque or translucent using the options with the same name in the "More Options" popup of the panel edit mode toolbar?
3. I notice the menu background doesn't have blur. Is the "Blur" effect in System Settings > Workspace Behavior > Desktop Effects disabled? Or does it not even appear there?
Comment 6 David 2023-03-13 18:45:23 UTC
(In reply to Nate Graham from comment #5)
> 1. Are any of the windows for those apps touching your Panel/taskbar when
> this happens?
> 2. Are you able to force the panel and its popups to always be opaque or
> translucent using the options with the same name in the "More Options" popup
> of the panel edit mode toolbar?
> 3. I notice the menu background doesn't have blur. Is the "Blur" effect in
> System Settings > Workspace Behavior > Desktop Effects disabled? Or does it
> not even appear there?

1. It doesn't make a difference if I start them maximized (they touch the panel) or not (don't touch the panel). It also keeps being broken after I close the apps.
2. Yes, and forcing it to be transparent has the intended effect in the pop-ups, with the undesirable side effect that now the whole panel is transparent.
3. It's there, and I have it deactivated so that the pop-ups would look like in the first screenshot.
Comment 7 Nate Graham 2023-03-14 13:49:47 UTC
Any chance it starts working again if you re-enable "Background Contrast" and "Blur"?

What about if you use Kicker or the new Kickoff, and not the old Kickoff?
Comment 8 David 2023-03-14 16:23:01 UTC
(In reply to Nate Graham from comment #7)
> Any chance it starts working again if you re-enable "Background Contrast"
> and "Blur"?
> 
> What about if you use Kicker or the new Kickoff, and not the old Kickoff?

But still happens when enabling "Blur" or "Background Contrast" or switching to the new application launchers. The bug also happens to tooltips when I hover the mouse over a widget and to the clock/calendar if I click it.
Comment 9 Nate Graham 2023-03-15 16:12:54 UTC
Thanks for the info. Any ideas what could be causing this, Niccolò?