Bug 446672

Summary: Scrolling in tooltip window thumbnails with highlight enabled will cause flickering
Product: [Plasma] plasmashell Reporter: Fushan Wen <qydwhotmail>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: minor CC: nate, plasma-bugs-null
Priority: NOR Keywords: efficiency-and-performance
Version First Reported In: master   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.24
Sentry Crash Report:

Description Fushan Wen 2021-12-08 07:41:46 UTC
SUMMARY
If "Highlight windows when hovering over task tooltips" is enabled, scrolling in tooltip window thumbnails will cause window re-activated even if the highlight is still the same.


STEPS TO REPRODUCE
1. Enable "Show tooltips" and "Highlight windows when hovering over task tooltips", and enable grouping.
2. Open many Konsole windows to make the scrollbar appear
3. Scroll in the tooltip

OBSERVED RESULT
The same window is flickering when scrolling in the tooltip, when the highlight is not changed.

EXPECTED RESULT
No flickering if the highlight is not changed.

SOFTWARE/OS VERSIONS
Information for package plasma5-desktop:
----------------------------------------
Repository     : unstable-kde-frameworks
Name           : plasma5-desktop
Version        : 5.23.80git.20211207T014525~b8d9ed8e5-ku.80.1
Arch           : x86_64
Vendor         : obs://build.opensuse.org/KDE:Unstable
Installed Size : 8.8 MiB
Installed      : Yes
Status         : up-to-date
Source package : plasma5-desktop-5.23.80git.20211207T014525~b8d9ed8e5-ku.80.1.src
Summary        : The KDE Plasma Workspace Components
Comment 1 Fushan Wen 2021-12-09 02:31:40 UTC
The description is wrong, but the visual glitch must be fixed.
Comment 2 Bug Janitor Service 2021-12-09 02:56:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/735
Comment 3 Nate Graham 2021-12-09 17:52:37 UTC
Git commit 8409043dd3e9d59648241217780af1452baf7df3 by Nate Graham, on behalf of Fushan Wen.
Committed on 09/12/2021 at 17:40.
Pushed by ngraham into branch 'master'.

taskmanager: Avoid flickering when scrolling in task tooltips

Using `QTimer::singleShot` to call `Backend::updateWindowHighlight` is
effective to avoid unnecessary window highlight updates when scrolling
in task tooltips.

M  +2    -1    applets/taskmanager/plugin/backend.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/8409043dd3e9d59648241217780af1452baf7df3