Bug 451489 - Shadowless tooltip on Wayland after its first appearance
Summary: Shadowless tooltip on Wayland after its first appearance
Status: RESOLVED UNMAINTAINED
Alias: None
Product: frameworks-kwidgetsaddons
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.92.0
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Christoph Feck
URL:
Keywords: wayland-only
Depends on:
Blocks:
 
Reported: 2022-03-14 12:42 UTC by Patrick Silva
Modified: 2023-05-08 17:07 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
tooltip with shadow (146.00 KB, image/png)
2022-03-14 12:42 UTC, Patrick Silva
Details
shadowless tooltip (142.11 KB, image/png)
2022-03-14 12:42 UTC, Patrick Silva
Details
semi-transparent menu in Screen Edges KCM (143.14 KB, image/png)
2022-07-11 12:08 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2022-03-14 12:42:23 UTC
Created attachment 147492 [details]
tooltip with shadow

STEPS TO REPRODUCE
1. open System Settings in sidebar view mode
2. click on any KCM and then hover over any KCM until its tooltip appears
3. repeat the step 2 until he observed result mentioned below occurs

OBSERVED RESULT
shadowless tooltip. Please compare the attached screenshots.

EXPECTED RESULT
tooltip should always have shadow

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 1 Patrick Silva 2022-03-14 12:42:54 UTC
Created attachment 147493 [details]
shadowless tooltip
Comment 2 Patrick Silva 2022-03-14 13:02:44 UTC
I can reproduce almost always with these steps:

1. open System Settings in sidebar view mode
2. click on Window Management in the sidebar
3. click on Window Rules KCM
4. hover over another KCM or Category
Comment 3 Nate Graham 2022-03-25 15:58:24 UTC
Can reproduce 100% with those steps.

Perhaps opening the window rules KCM triggers something in KWin that does this?
Comment 4 Ismael Asensio 2022-03-25 19:22:33 UTC
What I am experiencing is that the tooltip only casts a shadow on its first appearance on an app, but the shadow is no longer there on succesive appearances. That is, for the first KCM that gets hovered, there it the shadow but there is none after that. 

I can also reproduce this with Dolphin tooltips (if enabled).

So I don't think it is something specific to any KCM or even SystemSettings, but an issue with KTooltipWidget on Wayland (haven't tested yet on X).

From what the code there suggests, not having a shadow might be even intended, but removing that flag doesn't seem to change the behavior:
    q->setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::NoDropShadowWindowHint);
Comment 5 Ismael Asensio 2022-03-25 19:55:43 UTC
Ok, I confirmed this doesn't happen on X11, where shadows are always shown even with the mentioned steps.

A difference I have noticed is that on X, the tooltip window is marked as having the "Tooltip" role and property, but on Wayland it is not.
Maybe it is a KWin issue after all.

Also, Dolphin and SystemSettings seem to be the only 1st party apps that uses KToolTipWidget.
Comment 6 Patrick Silva 2022-05-13 13:48:00 UTC
another way to reproduce on neon unstable:

1. open Screen Edges KCM
2. choose another action to the upper left corner - I chose 'Desktop Grid'
3. apply the change - notice the screen flicker after click on 'Apply' button
4. hover over the categories in the sidebar

Result: shadowless tooltips
Comment 7 Patrick Silva 2022-07-11 12:08:08 UTC
Created attachment 150534 [details]
semi-transparent menu in Screen Edges KCM

If transparency is enabled in Breeze application style, the menus of the screen edges/corners become
semi-transparent after the steps provided in comment 6. Please see the attached screenshot.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.25.80
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Graphics Platform: Wayland
Comment 8 Patrick Silva 2023-05-08 17:07:59 UTC
The affected tooltips no longer exist.