Bug 439682 - [Wayland] An icon bounces continously near cursor after left/right click on a systray icon
Summary: [Wayland] An icon bounces continously near cursor after left/right click on a...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-07-09 13:44 UTC by Patrick Silva
Modified: 2021-07-12 13:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.23


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2021-07-09 13:44:07 UTC
STEPS TO REPRODUCE
1. use Wayland session
2. left/right click on systray icon of Discord OR right-click on systray icon of
Ktorrent
3. 

OBSERVED RESULT
an icon bounces continously near cursor until I minimize a window or open kickoff

EXPECTED RESULT
observed result should not occur

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.22.80
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 1 David Redondo 2021-07-12 08:52:41 UTC
At least in the case of Discord is because it implements org.kde.statusnotifieritem but not the xdgActivation method.
It doesn't use kstatusnotifieritem but ayatana judging from the object path.

The issue is that people implement our interface (for example telegram does too) to get an icon on plasma but we make changes to our interface. IN retrospect they shouldn't maybe not use org.kde but the freedesktop one but we cannot fix this.

So for this issue we either need to check if the method is implemented  (sounds like we would need to do some introspection) or if the call fails stop the token activation sequence (I don't think that's possible at the moment, except activating a window)

For the future we need to keep this in mind and either do such checks for every addition or version the interface in some ways.
Comment 2 David Redondo 2021-07-12 09:15:47 UTC
I just realized that we only support org.kde.Status* :(
Comment 3 David Edmundson 2021-07-12 10:08:50 UTC
Can we get the .desktop file entry from an SNI.

Currently there is an entry: StartupNotify=true

I think we can maybe expand this to include something wayland specific too  which I think we'll want for the normal launches
Comment 4 David Redondo 2021-07-12 10:18:33 UTC
Ids of SNIs on my system
- "Discover-Benachrichtigungen_org.kde.DiscoverNotifier"
- "KOrganizer-Erinnerungsmodul"
- "Charm"
- "discord1"
- "TelegramDesktop"
- "NeoChat"
Comment 5 Bug Janitor Service 2021-07-12 11:30:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/961
Comment 6 David Redondo 2021-07-12 11:37:34 UTC
Git commit 70a69b00c2a79ba9d877abe7cb7e80ad196bbd37 by David Redondo.
Committed on 12/07/2021 at 11:24.
Pushed by davidre into branch 'master'.

Do not set an application id on token requests from system tray

The Ids from SNIs are not the application id in the first place.
Also when activating an app which does not support the new method
on the inferface we never stop the startup effect.

M  +1    -1    applets/systemtray/statusnotifieritemjob.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/70a69b00c2a79ba9d877abe7cb7e80ad196bbd37