Skip to content
Verified Commit 9bdc1010 authored by Fushan Wen's avatar Fushan Wen
Browse files

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.

BUG: 467426
FIXED-IN: 5.27.7
(cherry picked from commit b5ee178b)
parent 959404ce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment