Bug 426646 - Middle-clicking on sound icon hidden in system tray only works for the icon itself, not the whole selection highlight
Summary: Middle-clicking on sound icon hidden in system tray only works for the icon i...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: 5.24.90
Platform: Archlinux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Konrad Materka
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-09-17 17:04 UTC by Patrick Silva
Modified: 2022-05-24 19:28 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.25.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-09-17 17:04:01 UTC
SUMMARY
Now we can toggle do-not-disturb mode with middle click on Notifications applet
(see bug 422811), but only when the applet is visible in system tray.

STEPS TO REPRODUCE
1. clear Notifications applet (now it is hidden in system tray)
2. click on the arrow to show hidden systray icons
3. middle click on Notifications applet

OBSERVED RESULT
nothing happens

EXPECTED RESULT
toggle do-not-disturb mode

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.0
Comment 1 Nate Graham 2020-09-18 21:02:15 UTC
Works for me. Are you middle-clicking on the icon itself, or on the text or an empty area of the selection highlight effect?
Comment 2 Patrick Silva 2020-09-18 21:33:03 UTC
it only works for me if I click on the icon itself

Operating System: Arch Linux
KDE Plasma Version: 5.19.90
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Comment 3 Nate Graham 2020-09-18 21:42:42 UTC
That's what I thought.
Comment 4 Nate Graham 2020-09-18 23:46:42 UTC
I'll see what I can do!
Comment 5 Kai Uwe Broulik 2020-10-09 20:02:16 UTC
That is System Tray, it would need to replay/reroute the event to appear "inside" the delegate.
Comment 6 Konrad Materka 2020-10-12 09:33:09 UTC
There is a similar problem for Night Color Control with left click - if clicked on the icon, it switches state, if on the text (or empty space around) it just shows empty applet.
Comment 7 Konrad Materka 2020-10-12 10:28:45 UTC
In older version of Plasma (5.19) we had the same issue - click on the label always opens the applet instead of passing the event (tested with Night Color Control).
Comment 8 Nate Graham 2020-10-12 13:30:43 UTC
Yeah, as with many things, it's not a regression, but the new design makes fixing this take an increased priority compared to the prior design. :)
Comment 9 Bug Janitor Service 2020-10-23 14:47:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/382
Comment 10 Konrad Materka 2020-12-29 17:36:33 UTC
Git commit b1b3193d09085f432bfe1ebfc1149365e41e702c by Konrad Materka.
Committed on 29/12/2020 at 17:35.
Pushed by kmaterka into branch 'master'.

[applets/systemtray] Fix click outside of applet

This solves the problem when the user clicks the padding around the applet or its label. The event is now correctly redirected to the applet.
This fixes both the left button and the middle click.
FIXED-IN: 5.21

M  +43   -2    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/b1b3193d09085f432bfe1ebfc1149365e41e702c
Comment 11 Patrick Silva 2021-01-26 13:12:36 UTC
This bug is still reproducible with sound applet set to "Always hidden" in system tray settings.

Operating System: Arch Linux
KDE Plasma Version: 5.20.90
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 12 Nate Graham 2021-01-26 19:33:53 UTC
Can reproduce.

Works for the notifications applet though.
Comment 13 Nate Graham 2022-01-11 20:45:27 UTC
Git commit caad921a27b75cb4cd04693af195addcc888a096 by Nate Graham.
Committed on 11/01/2022 at 20:44.
Pushed by ngraham into branch 'master'.

applet: re-arrange CompactRepresentation's MouseArea and Icon

With the MouseArea on top, the whole area accepts events in the expanded
view, so you can scroll anywhere to change the volume, not just over the
icon.
FIXED-IN: 5.24

M  +35   -37   applet/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-pa/commit/caad921a27b75cb4cd04693af195addcc888a096
Comment 14 Patrick Silva 2022-01-13 21:34:11 UTC
it's still reproducible on Plasma 5.24 beta.

Operating System: Arch Linux
KDE Plasma Version: 5.23.90
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 15 Nate Graham 2022-01-13 23:27:49 UTC
Weird, that worked for me yesterday. And I can reproduce it being broken today. But I have no idea how that's possible. Because scrolling works over any part of the highlight effect, which means the mouse area is handling events and filling the space properly. So there is no reason whatsoever why it wouldn't handle middle clicks in the whole area too.
Comment 16 Patrick Silva 2022-05-19 21:37:51 UTC
On Plasma 5.25 beta even middle-click on sound icon itself has no effect.

Operating System: Arch Linux
KDE Plasma Version: 5.24.90
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Graphics Platform: Wayland
Comment 17 Nate Graham 2022-05-23 14:32:14 UTC
Can reproduce. This was almost certainly caused by changes to the System Tray itself, in how it handles clicks for inactive items.
Comment 18 Kai Uwe Broulik 2022-05-23 14:37:55 UTC
It's a bug in System Tray. It forwards the clicked event but not pressed. It's also what breaks opening notifications history or something.
Comment 19 Bug Janitor Service 2022-05-23 15:02:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1761
Comment 20 Nate Graham 2022-05-24 19:27:26 UTC
Git commit f045cf306c4e581c38ead972ae9e0242e6fca2cd by Nate Graham, on behalf of Kai Uwe Broulik.
Committed on 24/05/2022 at 16:08.
Pushed by ngraham into branch 'master'.

[System Tray] Emit pressed signal on compact representation in popup, too

Some actions, such as middle click to mute, trigger only on press. Some applets
also need a pressed-click because of some legacy autoclose on focus change
bug.

Unfortunately, QML does not disambiguate the "pressed" property and "pressed(mouse)"
signal with argument, so this has to be done awkwardly through QMetaObject on C++ side.
Related: bug 452893
FIXED-IN: 5.25.0

M  +8    -1    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml
M  +25   -0    applets/systemtray/systemtray.cpp
M  +8    -0    applets/systemtray/systemtray.h

https://invent.kde.org/plasma/plasma-workspace/commit/f045cf306c4e581c38ead972ae9e0242e6fca2cd
Comment 21 Kai Uwe Broulik 2022-05-24 19:28:41 UTC
Git commit 7139ebfb3dd8ea078b07378c7964af2cbfb38f15 by Kai Uwe Broulik.
Committed on 24/05/2022 at 19:28.
Pushed by broulik into branch 'Plasma/5.25'.

[System Tray] Emit pressed signal on compact representation in popup, too

Some actions, such as middle click to mute, trigger only on press. Some applets
also need a pressed-click because of some legacy autoclose on focus change
bug.

Unfortunately, QML does not disambiguate the "pressed" property and "pressed(mouse)"
signal with argument, so this has to be done awkwardly through QMetaObject on C++ side.
Related: bug 452893
FIXED-IN: 5.25.0


(cherry picked from commit f045cf306c4e581c38ead972ae9e0242e6fca2cd)

M  +8    -1    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml
M  +25   -0    applets/systemtray/systemtray.cpp
M  +8    -0    applets/systemtray/systemtray.h

https://invent.kde.org/plasma/plasma-workspace/commit/7139ebfb3dd8ea078b07378c7964af2cbfb38f15