Bug 477426 - System Tray applets sometimes fail to open
Summary: System Tray applets sometimes fail to open
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-11-23 16:14 UTC by Bharadwaj Raju
Modified: 2023-11-28 11:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bharadwaj Raju 2023-11-23 16:14:34 UTC
SUMMARY
Sometimes, system tray applets will fail to open. I've observed it with different applets at different times.

When this happens, the following is printed by plasmashell:

QMetaMethod::invoke: cannot convert formal parameter 0 from QObject * in call to QQuickMouseArea::pressed(QQuickMouseEvent*)
kde.systemtray: Failed to invoke onPressed signal on CompactRepresentation_QMLTYPE_749(0x2fec030, parent=0x2fddb70, geometry=0,0 32x47) with QQuickMouseEvent(0x18126c8)

However, the same line is printed for applets which do open, so may or may not be relevant?

Restarting plasmashell usually solves the issue.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 39
KDE Plasma Version: 5.81.80
KDE Frameworks Version: 5.245.0
Qt Version: 6.6.0
Kernel Version: 6.5.11-300.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5625U with Radeon Graphics
Memory: 7.1 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Bharadwaj Raju 2023-11-23 16:15:02 UTC
Worth noting that right click still works on such applets.
Comment 2 Nate Graham 2023-11-26 17:10:29 UTC
Interesting, I have not seen this myself.

Is it consistently happening to the same applets? Or random ones?
Comment 3 Bharadwaj Raju 2023-11-26 17:14:26 UTC
I've noticed it with Bluetooth and Notifications so far. Both of them I was trying to open from the expanded systray.

That said, I think only one applet is affected at a time. Like, if Bluetooth is failing to open, I try the other applets and they work fine (and print the same message). Similarly for Notifications.
Comment 4 Marco Martin 2023-11-27 10:56:42 UTC
I can confirm notifications do open from the systray, but does not open when clicking on the expanded view.
looking into it
Comment 5 Marco Martin 2023-11-27 11:02:30 UTC
correction: clicking in the expanded area is broken only after having opened it from the systray once
Comment 6 Bug Janitor Service 2023-11-28 11:17:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3616
Comment 7 Marco Martin 2023-11-28 11:19:49 UTC
Git commit cd19fafd4cb2708c2158e5a5a793a937c683ae7b by Marco Martin.
Committed on 28/11/2023 at 12:19.
Pushed by mart into branch 'master'.

Remove emitPRessed hack

This on qt6 didn't work at all anymore, as passing the declarative mouse
event as a QObject couldn't work anymore.

however on qt6 it works invoking onPressed() from qml (rather than
pressed which is shadowed) which didn't on Qt5

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

https://invent.kde.org/plasma/plasma-workspace/-/commit/cd19fafd4cb2708c2158e5a5a793a937c683ae7b