From a321bbcefee7d221fc2fd52a569bdb8740b9dd0b Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Thu, 3 Feb 2022 21:46:31 +0100 Subject: [PATCH] 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 --- .../systemtray/package/contents/ui/items/AbstractItem.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applets/systemtray/package/contents/ui/items/AbstractItem.qml b/applets/systemtray/package/contents/ui/items/AbstractItem.qml index 6f01a6bfe..aad42d360 100644 --- a/applets/systemtray/package/contents/ui/items/AbstractItem.qml +++ b/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