systray: Fix systray collapsing on click

The MouseArea in AbstractItem needs to be above applets
when it's in the grid hidden area so that it can receive
hover events while the mouse is over an applet

But when the applet is shown as an icon on the regular
systray it needs to be below so the PlasmoidItem `onClick`
takes precedence and systray collapsing works.

BUG: 449533
FIXED-IN: 5.24
wilder-5.25
Ismael Asensio 4 years ago
parent e1d1b601f8
commit a321bbcefe
  1. 7
      applets/systemtray/package/contents/ui/items/AbstractItem.qml

@ -94,9 +94,10 @@ PlasmaCore.ToolTipArea {
MouseArea {
propagateComposedEvents: true
// This needs to be above applets so that it can receive
// hover events while the mouse is over an applet.
z: 1
// This needs to be above applets when it's in the grid hidden area
// so that it can receive hover events while the mouse is over an applet,
// but below them on regular systray, so collapsing works
z: inHiddenLayout ? 1 : 0
anchors.fill: abstractItem
hoverEnabled: true
drag.filterChildren: true

Loading…
Cancel
Save