Bug 439522 - Tooltip with the player controls row sometimes disappears very fast (onContainsMouseChanged wrongly triggered)
Summary: Tooltip with the player controls row sometimes disappears very fast (onContai...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-05 16:00 UTC by Fushan Wen
Modified: 2022-04-25 20:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments
STEPS TO REPRODUCE (712.31 KB, video/mp4)
2021-07-05 16:00 UTC, Fushan Wen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2021-07-05 16:00:33 UTC
Created attachment 139874 [details]
STEPS TO REPRODUCE

SUMMARY
Tooltips with album art image sometimes disappear very fast.

STEPS TO REPRODUCE
1. Move your mouse over any non-player icon on the taskbar, and wait for the tooltip shown.
2. Move your mouse away from the taskbar.
3. Move your mouse over any program, of which the tooltip is an album art image.

OBSERVED RESULT
The tooltip lasts for only a second or less.

EXPECTED RESULT
The tooltip lasts longer like other tooltips.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210702
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.12.13-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
You can see the video in the attachment to see how to reproduce the bug.
Comment 1 Fushan Wen 2021-07-06 01:39:44 UTC
I notice that when the tooltip disappears very fast, onContainsMouseChanged in Task.qml are called twice instead of once.
Comment 2 Fushan Wen 2021-07-06 04:30:19 UTC
After I hide the player controls row (visible: false) in ToolTipInstance.qml, the bug is gone. So the problem may exist in the player controls row.
Comment 3 Fushan Wen 2021-07-06 10:06:28 UTC
It seems like something transparent (overlay?) flashes above the task icon, of which the height is similar to the player controls row, when hovering over the icon.
Comment 4 Fushan Wen 2021-07-06 10:15:00 UTC
(In reply to qydwhotmail from comment #3)
> It seems like something transparent (overlay?) flashes above the task icon,
> of which the height is similar to the player controls row, when hovering
> over the icon.

After changing the number of Layout.maximumHeight of the player controls row (in ToolTipInstance.qml), I can now confirm the height of the hidden overlay is the same or at least proportional to the height of the player controls row, which explains why the bug is gone after hiding the player controls row (height=0).
Comment 5 Fushan Wen 2021-07-06 11:05:56 UTC
After I disable the compositor, the bug is also gone. Could the bug be also related to the window creation animation?
Comment 6 Bug Janitor Service 2021-07-06 12:42:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/523
Comment 7 Bug Janitor Service 2021-10-06 14:27:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/346
Comment 8 Noah Davis 2021-10-07 07:16:31 UTC
Git commit 578a5db6006430ad29e16e3e671bb86a531f7c98 by Noah Davis, on behalf of Fushan Wen.
Committed on 07/10/2021 at 07:16.
Pushed by ndavis into branch 'master'.

[applets/taskmanger] Do not overlay scrollbars over contents

The scrollbar should have its own space instead of overlapping
the thumbnail or the media controller.
Related: bug 443173

M  +9    -3    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/578a5db6006430ad29e16e3e671bb86a531f7c98
Comment 9 Noah Davis 2021-10-07 07:19:46 UTC
Git commit 32439d71f5ff7b1d10b214df39658561e025d747 by Noah Davis, on behalf of Fushan Wen.
Committed on 07/10/2021 at 07:17.
Pushed by ndavis into branch 'Plasma/5.23'.

[applets/taskmanger] Do not overlay scrollbars over contents

The scrollbar should have its own space instead of overlapping
the thumbnail or the media controller.
Related: bug 443173
(cherry picked from commit 578a5db6006430ad29e16e3e671bb86a531f7c98)

M  +9    -3    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/32439d71f5ff7b1d10b214df39658561e025d747
Comment 10 Fushan Wen 2021-10-07 14:19:03 UTC
The bug has not been fixed yet. Framework patch should be also applied. 

https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/346
Comment 11 Nate Graham 2021-10-14 17:38:15 UTC
Git commit 2355c4182e510ed3069a3f7b37ded5008b5ee2fa by Nate Graham, on behalf of Fushan Wen.
Committed on 14/10/2021 at 17:37.
Pushed by ngraham into branch 'master'.

Prevent tooltips from being incorrectly dismissed

Having a single shared ToolTipDelegate causes problems with Dialog
positioning when the size changes significantly.

The sequence of widget events when the bug is triggered is:

1. QEvent::Resize (Size is changed)
2. QEvent::Move (Position is changed, but the vertical coordinate is not)
3. QEvent::Leave (Therefore some tooltips are incorrectly dismissed)

Add m_extendTimeoutFlag to prevent interactive tooltips from being
incorrectly dismissed.
Related: bug 434657

M  +21   -3    src/declarativeimports/core/tooltipdialog.cpp
M  +9    -0    src/declarativeimports/core/tooltipdialog.h

https://invent.kde.org/frameworks/plasma-framework/commit/2355c4182e510ed3069a3f7b37ded5008b5ee2fa
Comment 12 Nate Graham 2022-04-25 20:19:14 UTC
Git commit 640db8536338d93ea104e797ac202ee2ffc93014 by Nate Graham, on behalf of Fushan Wen.
Committed on 25/04/2022 at 20:11.
Pushed by ngraham into branch 'master'.

Revert "Prevent tooltips from being incorrectly dismissed"

This reverts commit 2355c4182e510ed3069a3f7b37ded5008b5ee2fa.

After 29d31c159503e454b3c483b0b7eb180ce0ee926a, the hack is not needed.

M  +3    -21   src/declarativeimports/core/tooltipdialog.cpp
M  +0    -9    src/declarativeimports/core/tooltipdialog.h

https://invent.kde.org/frameworks/plasma-framework/commit/640db8536338d93ea104e797ac202ee2ffc93014