Bug 467426 - Often wrong window preview shown on hover
Summary: Often wrong window preview shown on hover
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.27.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
: 469556 470012 470155 472658 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-03-15 23:20 UTC by John Veness
Modified: 2023-08-11 22:23 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.7


Attachments
Task Manager preview problem (1.99 MB, video/mp4)
2023-03-15 23:20 UTC, John Veness
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Veness 2023-03-15 23:20:54 UTC
Created attachment 157321 [details]
Task Manager preview problem

SUMMARY
The window preview shown when you hover over a task manager icon often seems to show the wrong window.

STEPS TO REPRODUCE
1. Have more than one task open
2. Move the mouse over the task manager entries and hover over some of them

OBSERVED RESULT
Often a preview of the wrong window is shown.

EXPECTED RESULT
A preview of the correct window is shown.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230313
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.4-1-default (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-7200U CPU @ 2.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 620
Manufacturer: HP
Product Name: HP ProBook 450 G4

ADDITIONAL INFORMATION
Comment 1 Fushan Wen 2023-03-18 08:57:28 UTC
It's caused by the new triangle filter introduced in Plasma 5.27.
Comment 2 John Veness 2023-03-18 15:11:20 UTC
(In reply to Fushan Wen from comment #1)
> It's caused by the new triangle filter introduced in Plasma 5.27.

Thanks. That certainly matches my memory of roughly how long I've seen this issue.
Comment 3 Nate Graham 2023-05-19 20:32:10 UTC
*** Bug 469556 has been marked as a duplicate of this bug. ***
Comment 4 Fushan Wen 2023-06-04 08:22:58 UTC
*** Bug 470155 has been marked as a duplicate of this bug. ***
Comment 5 Fushan Wen 2023-06-12 03:09:37 UTC
*** Bug 470012 has been marked as a duplicate of this bug. ***
Comment 6 Bug Janitor Service 2023-06-23 09:20:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3027
Comment 7 Bug Janitor Service 2023-07-16 13:51:42 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3079
Comment 8 Fushan Wen 2023-07-22 06:35:56 UTC
Git commit b5ee178bc7d6bd5958f433592fb2983228a2453e by Fushan Wen.
Committed on 22/07/2023 at 06:14.
Pushed by fusionfuture into branch 'master'.

TriangleMouseFilter: fix incorrect handling of hover events and inactive state

1. Even if inactive, we still need to record the current item so when active becomes
   true after the child item is hovered, the filter can still work correctly.
2. When resetTimer is still active (waiting), the saved item may
   already have changed, so don't eat the event when the timer is
   still running. This fixes containsMouse not updating correctly.

Explanation:

When the previous HoverEnter is still blocked by the timer, a new HoverEnter
arrives but Qt doesn't send a HoverLeave if the previous item hasn't received
a HoverEnter, so sometimes m_interceptedHoverItem is not reset before the new
item's HoverEnter arrives.

And the new item's HoverEnter can arrive after the timer is triggered, so the
old item also receives a HoverEnter and thus the old item wrongly thinks it's
hovered.

This also moves all relevant properties to a unified struct, so when
resetting items, relevant properties will also be reset.
FIXED-IN: 5.27.7

M  +34   -29   components/trianglemousefilter/trianglemousefilter.cpp
M  +28   -6    components/trianglemousefilter/trianglemousefilter.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/b5ee178bc7d6bd5958f433592fb2983228a2453e
Comment 9 Fushan Wen 2023-07-22 08:08:53 UTC
Git commit 959404ce00e156142ef4e5e5e6087f2b4b850661 by Fushan Wen, on behalf of Derek Christ.
Committed on 22/07/2023 at 07:45.
Pushed by fusionfuture into branch 'Plasma/5.27'.

TriangularMouseFilter: Filter event everytime when there was no movement at all

(cherry picked from commit 9b4cd3b04e8696f9bc7a6be247d45e34ced080bc)

M  +23   -12   components/trianglemousefilter/trianglemousefilter.cpp
M  +1    -1    components/trianglemousefilter/trianglemousefilter.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/959404ce00e156142ef4e5e5e6087f2b4b850661
Comment 10 Fushan Wen 2023-07-22 08:09:01 UTC
Git commit 2186fa259708ded8ce8e9441da23ecad28824593 by Fushan Wen, on behalf of Derek Christ.
Committed on 22/07/2023 at 07:45.
Pushed by fusionfuture into branch 'Plasma/5.27'.

Improve responsiveness of triangular filter

The responsiveness of the filter is improved by adding two new
metrics to the filter logic:     - Firstly, the direction of the cursor
movement is considered. If (in the default configuration) the filter is
currently active and the user moves the cursor to the left (away from the
content area), the filter stops intercepting the movement events. This
results in a noticeable improvement in responsiveness without compromise
the objective of the filter.     - Secondly, a velocity metric (as
already brought up in BUG 438950) is added. This ensures that a very slow
movement of the cursor results in disabling the triangular filter. This,
also, improves the the feeling of responsiveness significantly. Still,
there is a need for the timer in the filter, as when the cursor has
stopped its movement completely, it will no longer send HoverMove events
to the filter, thus it wouldn't be possible to detect a complete stop
of the cursor.

(cherry picked from commit 6c18efd13cabde92f82fa881a7ebb29beda7344b)

M  +84   -45   components/trianglemousefilter/trianglemousefilter.cpp
M  +8    -1    components/trianglemousefilter/trianglemousefilter.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/2186fa259708ded8ce8e9441da23ecad28824593
Comment 11 Fushan Wen 2023-07-22 08:09:09 UTC
Git commit 9bdc101051d878addad8f59521a0b0d72be9e61f by Fushan Wen.
Committed on 22/07/2023 at 07:45.
Pushed by fusionfuture into branch 'Plasma/5.27'.

TriangleMouseFilter: fix incorrect handling of hover events and inactive state

1. Even if inactive, we still need to record the current item so when active becomes
   true after the child item is hovered, the filter can still work correctly.
2. When resetTimer is still active (waiting), the saved item may
   already have changed, so don't eat the event when the timer is
   still running. This fixes containsMouse not updating correctly.

Explanation:

When the previous HoverEnter is still blocked by the timer, a new HoverEnter
arrives but Qt doesn't send a HoverLeave if the previous item hasn't received
a HoverEnter, so sometimes m_interceptedHoverItem is not reset before the new
item's HoverEnter arrives.

And the new item's HoverEnter can arrive after the timer is triggered, so the
old item also receives a HoverEnter and thus the old item wrongly thinks it's
hovered.

This also moves all relevant properties to a unified struct, so when
resetting items, relevant properties will also be reset.
FIXED-IN: 5.27.7
(cherry picked from commit b5ee178bc7d6bd5958f433592fb2983228a2453e)

M  +34   -29   components/trianglemousefilter/trianglemousefilter.cpp
M  +28   -6    components/trianglemousefilter/trianglemousefilter.h

https://invent.kde.org/plasma/plasma-workspace/-/commit/9bdc101051d878addad8f59521a0b0d72be9e61f
Comment 12 Fushan Wen 2023-07-29 11:10:32 UTC
*** Bug 472658 has been marked as a duplicate of this bug. ***
Comment 13 John Veness 2023-08-11 22:23:43 UTC
Very many thanks for fixing this. It now feels much more comfortable :)