<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>449870</bug_id>
          
          <creation_ts>2022-02-09 15:39:10 +0000</creation_ts>
          <short_desc>Tray icons don&apos;t react to right click</short_desc>
          <delta_ts>2022-02-14 18:50:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>System Tray widget</component>
          <version>5.24.0</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>VHI</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael">voron1</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>dr_thodt</cc>
    
    <cc>g111</cc>
    
    <cc>gonterman.matt</cc>
    
    <cc>holo-doc</cc>
    
    <cc>kde</cc>
    
    <cc>login+kde-bugs</cc>
    
    <cc>materka</cc>
    
    <cc>mo78</cc>
    
    <cc>nate</cc>
    
    <cc>nicolas.fella</cc>
    
    <cc>noahadvs</cc>
    
    <cc>realnc</cc>
    
    <cc>voron1</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/commit/b53fec3714c68ae6191f3c2207e7b7a06b53d9f5</cf_commitlink>
          <cf_versionfixedin>5.24.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2102461</commentid>
    <comment_count>0</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-09 15:39:10 +0000</bug_when>
    <thetext>SUMMARY
***
Tray icons like discord and gxneur (legacy), don&apos;t react to right mouse click. No menu shows up. Worked in the previous version (5.23.5).
***

SOFTWARE/OS VERSIONS
5.16.8-gentoo
Linux/KDE Plasma: 5.24
(available in About System)
KDE Plasma Version: 5.24
KDE Frameworks Version:  5.90
Qt Version: 5.15.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102469</commentid>
    <comment_count>1</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-09 16:11:31 +0000</bug_when>
    <thetext>Notably Viber&apos;s tray icon menu works as it should.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102540</commentid>
    <comment_count>2</comment_count>
    <who name="Behzad A">behzad.a_ir</who>
    <bug_when>2022-02-09 19:35:44 +0000</bug_when>
    <thetext>*** Bug 449879 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102585</commentid>
    <comment_count>3</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-09 21:08:19 +0000</bug_when>
    <thetext>Skype&apos;s icon doesn&apos;t show the menu either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102683</commentid>
    <comment_count>4</comment_count>
    <who name="Nikos Chantziaras">realnc</who>
    <bug_when>2022-02-10 04:32:34 +0000</bug_when>
    <thetext>I have the exact same issue.  Downgrading to 5.23.5 fixes it.

A workaround is to install libappindicator, which is detected by discord and makes it use a different method to implement its tray icon. However, this is far from a good workaround because then there&apos;s no left click support anymore. Both right and left clicking on the tray icon will simply open the same context menu. Normally, what you want is not have libappindicator installed so that a left click on the tray icon will unminimize discord, and a right click will open the context menu, like in virtually any other application that has a tray icon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102774</commentid>
    <comment_count>5</comment_count>
    <who name="Claudio">holo-doc</who>
    <bug_when>2022-02-10 09:34:03 +0000</bug_when>
    <thetext>Same problem here since the upgrade from 5.23.90 to 5.24 - Discord and Gajim right click menus in the taskbar are no longer working. At the moment of the right click the following entry appears in the journal:

plasmashell[818]: Could not find DBusMenu interface, falling back to calling ContextMenu()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102802</commentid>
    <comment_count>6</comment_count>
    <who name="Claudio">holo-doc</who>
    <bug_when>2022-02-10 10:47:19 +0000</bug_when>
    <thetext>OK you can ignore my previous post about the journal entry regarding &quot;DBusMenu interface&quot;, as it also appears when downgrading to the still working plasma-workspace 5.23.90.

I browsed through the git history and reverting part of the changes in StatusNotifierItem.qml of commit ae5f355a992786834babc952c616b21929cd3a97 makes the right click menu appear again.

I just readded the following at line 61 and then everything works as expected:

 case Qt.RightButton:
            openContextMenu(pos);
            break;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102828</commentid>
    <comment_count>7</comment_count>
    <who name="Behzad A">behzad.a_ir</who>
    <bug_when>2022-02-10 12:09:16 +0000</bug_when>
    <thetext>*** Bug 449928 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102884</commentid>
    <comment_count>8</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2022-02-10 14:28:16 +0000</bug_when>
    <thetext>I can&apos;t reproduce this on git master. Maybe a commit depending on KF5.91 was cherry-picked to Plasma 5.24 too soon?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102885</commentid>
    <comment_count>9</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2022-02-10 14:30:53 +0000</bug_when>
    <thetext>Which app did you test? It doesn&apos;t happen with apps using &quot;proper&quot; SNIs, so all KDE apps, Electron etc

I can reproduce it on master with Gajim</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102889</commentid>
    <comment_count>10</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2022-02-10 14:33:24 +0000</bug_when>
    <thetext>(In reply to Nicolas Fella from comment #9)
&gt; Which app did you test? It doesn&apos;t happen with apps using &quot;proper&quot; SNIs, so
&gt; all KDE apps, Electron etc
&gt; 
&gt; I can reproduce it on master with Gajim

I tested Discord since the reporter said they had a problem with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102892</commentid>
    <comment_count>11</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2022-02-10 14:37:15 +0000</bug_when>
    <thetext>Ok, I can reproduce this with Gajim</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102894</commentid>
    <comment_count>12</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2022-02-10 14:39:04 +0000</bug_when>
    <thetext>(In reply to Nicolas Fella from comment #9)
&gt; Which app did you test? It doesn&apos;t happen with apps using &quot;proper&quot; SNIs

What makes an SNI &quot;proper&quot; or &quot;improper&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102902</commentid>
    <comment_count>13</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2022-02-10 15:00:05 +0000</bug_when>
    <thetext>What I&apos;m referring to is StatusNotifierItem vs xembed tray icons. Although I&apos;m not 100% sure that&apos;s the relevant difference here</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102920</commentid>
    <comment_count>14</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-10 15:45:28 +0000</bug_when>
    <thetext>(In reply to Claudio from comment #6)
&gt; I browsed through the git history and reverting part of the changes in
&gt; StatusNotifierItem.qml of commit ae5f355a992786834babc952c616b21929cd3a97
&gt; makes the right click menu appear again.
&gt; 
&gt; I just readded the following at line 61 and then everything works as
&gt; expected:
&gt; 
&gt;  case Qt.RightButton:
&gt;             openContextMenu(pos);
&gt;             break;

Could you make it into a patch on top of 5.24 so I could test? I&apos;d very much appreciate that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2102937</commentid>
    <comment_count>15</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-10 16:19:08 +0000</bug_when>
    <thetext>Okay, I did the manual partial undoind of ae5f355a99 and it fixes the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103027</commentid>
    <comment_count>16</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-10 19:10:30 +0000</bug_when>
    <thetext>My findings so far:
Tixati, Teams, Discord, Skype, Jdownloader. All with missing context menu. Is 5.24 still in alpha???</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103029</commentid>
    <comment_count>17</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-10 19:13:35 +0000</bug_when>
    <thetext>*** Bug 449963 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103307</commentid>
    <comment_count>18</comment_count>
    <who name="maetthu">login+kde-bugs</who>
    <bug_when>2022-02-11 12:20:10 +0000</bug_when>
    <thetext>Slack and 1password are also affected (both electron)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103312</commentid>
    <comment_count>19</comment_count>
    <who name="gromky">dr_thodt</who>
    <bug_when>2022-02-11 12:41:45 +0000</bug_when>
    <thetext>Same problem in Deadbeef player and Altus (Whatsapp client)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103317</commentid>
    <comment_count>20</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-11 12:55:01 +0000</bug_when>
    <thetext>@Michael
How we can apply your patch? This weird bug literally ruins my workflow :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103336</commentid>
    <comment_count>21</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2022-02-11 13:30:25 +0000</bug_when>
    <thetext>(In reply to Nick Stefanov from comment #20)
&gt; @Michael
&gt; How we can apply your patch? This weird bug literally ruins my workflow :(

A quicker self-fix would be to install libappindicator. It seems we missed this bug because every KDE dev who tested the patch had libappindicator installed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103344</commentid>
    <comment_count>22</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-11 13:43:29 +0000</bug_when>
    <thetext>@Noah Davis
Thank you for your suggestion but unfortunately ibappindicator is not an option for me. Some of the reasons are very well described in comment 4:
https://bugs.kde.org/show_bug.cgi?id=449870#c4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103358</commentid>
    <comment_count>23</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-11 14:34:43 +0000</bug_when>
    <thetext>Heh maybe I&apos;ll remove libappindicator so I can catch future regressions in this use case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103366</commentid>
    <comment_count>24</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-11 14:40:52 +0000</bug_when>
    <thetext>(In reply to Nick Stefanov from comment #20)
&gt; @Michael
&gt; How we can apply your patch? This weird bug literally ruins my workflow :(

There is no patch. I went and partially undid this commit https://invent.kde.org/plasma/plasma-workspace/-/commit/ae5f355a992786834babc952c616b21929cd3a97
namely the changes to StatusNotifierItem.qml and then rebuilt and reinstalled. How to do all that in your distro, I frankly have no idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103384</commentid>
    <comment_count>25</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-11 15:47:21 +0000</bug_when>
    <thetext>Ah, thanks, let&apos;s hope it will be fixed quick.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103385</commentid>
    <comment_count>26</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-11 15:51:54 +0000</bug_when>
    <thetext>(In reply to Noah Davis from comment #21)
&gt; A quicker self-fix would be to install libappindicator. It seems we missed
&gt; this bug because every KDE dev who tested the patch had libappindicator
&gt; installed.

I don&apos;t know about that. I played with libappindicator, and while it does help discord, old gtk apps (gxneur) still don&apos;t have the tray menu. I suspect it&apos;ll be the same for gajim.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103548</commentid>
    <comment_count>27</comment_count>
    <who name="Claudio">holo-doc</who>
    <bug_when>2022-02-11 19:19:23 +0000</bug_when>
    <thetext>For a workaround just add to the following file on your system (make a backup copy before):
/usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/StatusNotifierItem.qml
at line 61 the following 3 lines with your texteditor of choice  (nano, kate or whatever):

case Qt.RightButton:
            openContextMenu(pos);
            break;

Now run &quot;plasmashell --replace&quot; and the right click menu is working again - no need to compile anything yourself.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103565</commentid>
    <comment_count>28</comment_count>
    <who name="Michael">voron1</who>
    <bug_when>2022-02-11 19:45:45 +0000</bug_when>
    <thetext>@Claudio
Thanks, I didn&apos;t realize you don&apos;t need that file for compilation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103663</commentid>
    <comment_count>29</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-11 22:26:46 +0000</bug_when>
    <thetext>@Michael
Yep, it&apos;s working! Thank you so much!!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2103781</commentid>
    <comment_count>30</comment_count>
    <who name="Matt">gonterman.matt</who>
    <bug_when>2022-02-12 07:36:51 +0000</bug_when>
    <thetext>@Claudio - You are awesome!  Thank you so much!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104535</commentid>
    <comment_count>31</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-02-14 16:37:38 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1455</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104576</commentid>
    <comment_count>32</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-14 18:14:20 +0000</bug_when>
    <thetext>Git commit 03f982261b7f329b42d490651efca1f115cbf097 by Nate Graham, on behalf of Claudio Holo.
Committed on 14/02/2022 at 18:13.
Pushed by ngraham into branch &apos;master&apos;.

applets/systemtray: fix SNI context menu usage without libappindicator

StatusNotifierItem.qml does not explicitly handle the case of
right-clicking, which causes right-clicks to be ignored unless you also
happen to have the libappindicator package installed, which injects a
handler for this itself. But this should work even if you don&apos;t have
that package installed; this commit fixes it.
FIXED-IN: 5.24.1

M  +3    -0    applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/03f982261b7f329b42d490651efca1f115cbf097</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104577</commentid>
    <comment_count>33</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-14 18:14:48 +0000</bug_when>
    <thetext>Git commit b53fec3714c68ae6191f3c2207e7b7a06b53d9f5 by Nate Graham, on behalf of Claudio Holo.
Committed on 14/02/2022 at 18:14.
Pushed by ngraham into branch &apos;Plasma/5.24&apos;.

applets/systemtray: fix SNI context menu usage without libappindicator

StatusNotifierItem.qml does not explicitly handle the case of
right-clicking, which causes right-clicks to be ignored unless you also
happen to have the libappindicator package installed, which injects a
handler for this itself. But this should work even if you don&apos;t have
that package installed; this commit fixes it.
FIXED-IN: 5.24.1


(cherry picked from commit 03f982261b7f329b42d490651efca1f115cbf097)

M  +3    -0    applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/b53fec3714c68ae6191f3c2207e7b7a06b53d9f5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104600</commentid>
    <comment_count>34</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-02-14 18:50:05 +0000</bug_when>
    <thetext>Thank you!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>