Verified Commit d6687be3 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

[applet/appmenu] Fix top level menu hovering state when QMenu is open

This bug may happen if you rapidly move mouse horizontally and clicking
on the menu at the same time: in some cases the originally pressed menu
item would remain visually pressed (because hovered property can't reset
while grab is active), and some other item whose index matches the value
of Plasmoid.nativeInterface.currentIndex will be `down` too.

FIXED-IN: 5.26
(cherry picked from commit 662a9c51)
parent 067fccb4
Pipeline #235254 passed with stage
in 7 minutes and 8 seconds
......@@ -42,9 +42,10 @@ AbstractButton {
}
property int menuState: {
// can't trust hovered state while QMenu is grabbing mouse pointer.
if (down) {
return MenuDelegate.State.Down;
} else if (hovered) {
} else if (hovered && !menuIsOpen) {
return MenuDelegate.State.Hover;
}
return MenuDelegate.State.Rest;
......
Supports Markdown
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