<?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>409768</bug_id>
          
          <creation_ts>2019-07-13 11:15:15 +0000</creation_ts>
          <short_desc>On X11, right-clicking on System Tray app icon causes subsequent left-click on Task Manager apps to activate the tray icon&apos;s app instead</short_desc>
          <delta_ts>2022-03-26 02:18:39 +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>XembedSNIProxy</component>
          <version>5.24.1</version>
          <rep_platform>Neon</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=433079</see_also>
          <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="boospy">linux</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>allo</cc>
    
    <cc>kde</cc>
    
    <cc>mfraz74+kde</cc>
    
    <cc>mo78</cc>
    
    <cc>nate</cc>
    
    <cc>noahadvs</cc>
    
    <cc>norbert</cc>
    
    <cc>s.zb</cc>
    
    <cc>spider.gaming</cc>
    
    <cc>sunnerlp+kde</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/commit/a9d5ea2afd33ee4fb51b6caf0af5a902a3d81352</cf_commitlink>
          <cf_versionfixedin>5.24.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1868545</commentid>
    <comment_count>0</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-07-13 11:15:15 +0000</bug_when>
    <thetext>Looks like i found a bug. I tested it with a fresh neon installation and a fresh userprofile. If you click with the right mousebutton on an application in the taskpanel on the right site, on most application you got an menu. So my example was choqok. But it works with any other application too, nextcloud, steam, sm4k... after the rightclick, click back to desktop or another place, after that on every application you click on the right site on the taskpanel, the same menu opens. But it gets even funnier. Becaues you click on an open application like dolphin, in my case choqok opens instead.

Here is the screencast of this issue: https://darkdevil.osit.cc/index.php/s/NKtsFQmHefET5Pz

Thanks a lot</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868659</commentid>
    <comment_count>1</comment_count>
    <who name="Rich Johnson">rjohnson</who>
    <bug_when>2019-07-14 02:58:41 +0000</bug_when>
    <thetext>I will add to this as I can confirm. If I right click on something in my system tray, Discord as an example, then click anywhere else, when I click on anything in the panel it will popup the last menu I selected. I just confirmed boospy&apos;s issue after watching their screencast.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869061</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-07-15 22:14:48 +0000</bug_when>
    <thetext>Thanks for the video, that&apos;s very helpful! However I&apos;m not able to reproduce it with my icons-only task manager on Plasmas 5.16.2 or with everything built from git master.

Is it just apps in the system tray where this happens, or all items (e.g. Volume, network status, etc)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869063</commentid>
    <comment_count>3</comment_count>
    <who name="Rich Johnson">rjohnson</who>
    <bug_when>2019-07-15 22:21:43 +0000</bug_when>
    <thetext>Hey Nate, I just checked, it seems to only happen to non-KDE/Plasma icons. In my case it happens with Chrome, Dropbox, Keybase, Discord, and KeePassX. It does not happen with Network Manager, Volume, Battery, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869064</commentid>
    <comment_count>4</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-07-15 22:23:03 +0000</bug_when>
    <thetext>Yes with all. But it&apos;s happens only if you click first on an app in the system tray. After that you click on volume, network, and you can see the issue. 
But if you click fist on volume, network... and after on an app in the system tray, the menu form the app comes up, not that from example volume. So this direction it works right. 

You can also click right on PSI+ after that click left on Kontact and PSI+ comes up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870697</commentid>
    <comment_count>5</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-07-24 16:00:22 +0000</bug_when>
    <thetext>When can we expect that this bug will be fixed? I think you can understand that this is a bit of a hassle all day in the office. 

Thanks a lot, and if you need more infos, i will do my best :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1873121</commentid>
    <comment_count>6</comment_count>
    <who name="Christoph Feck">cfeck</who>
    <bug_when>2019-08-05 19:05:53 +0000</bug_when>
    <thetext>New information was provided; changing status for inspection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875042</commentid>
    <comment_count>7</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-08-15 15:18:16 +0000</bug_when>
    <thetext>Here the new sharelink. The old was expired ;(

https://darkdevil.osit.cc/index.php/s/enWkcfk38woidmE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875073</commentid>
    <comment_count>8</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-08-15 15:59:22 +0000</bug_when>
    <thetext>If possible, please attach the video to the bug so it&apos;s visible forever. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875075</commentid>
    <comment_count>9</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2019-08-15 16:04:38 +0000</bug_when>
    <thetext>For future, yes please attach.
Don&apos;t bother now given it should be fixed with 
https://phabricator.kde.org/D22804 which I hope to see merged soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875085</commentid>
    <comment_count>10</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-08-15 16:54:32 +0000</bug_when>
    <thetext>Git commit 67c1117fa52d43877626ed2d7e3b5cdf02f3e5df by Nate Graham, on behalf of Konrad Materka.
Committed on 15/08/2019 at 16:54.
Pushed by ngraham into branch &apos;master&apos;.

[System Tray] Do not send ContextMenu signal twice

Summary:
System Tray sends two &quot;ContextMenu&quot; events which breaks focus.
One is send on mouse pressed, second on mouse clicked. As a result
right click on the system tray icon causes focus to lock on the icon.
If later user clicks somewhere else event is send to the first icon.
Related: bug 376277
FIXED-IN: 5.17.0

Test Plan:
The best to test with Skype for Linux with SNI bridge.

To reproduce:
* Right click on the Skype icon, click on menu item (can be Show Skype)
* Right click on any other icon in system tray (or even any other place on the panel)
* Skype menu will appear

After fix:
* Right click on the Skype icon, click on menu item (can be Show Skype)
* Right click on any other icon in system tray (or even any other place on the panel)
* Correct menu should show

Reviewers: #plasma, broulik, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: broulik, apol, plasma-devel, #plasma_workspaces

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22804

M  +2    -3    applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +5    -0    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://commits.kde.org/plasma-workspace/67c1117fa52d43877626ed2d7e3b5cdf02f3e5df</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875111</commentid>
    <comment_count>11</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-08-15 18:16:28 +0000</bug_when>
    <thetext>Really, Really fine!!! So many Thanks! :) :) :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878830</commentid>
    <comment_count>12</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-09-07 17:26:10 +0000</bug_when>
    <thetext>When come that fix in KDE? I&apos;ve updated today application fix. And it is not fixed. Between the time i&apos;ve updated the files manually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878869</commentid>
    <comment_count>13</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-09-07 20:00:58 +0000</bug_when>
    <thetext>The &quot;version fixed in&quot; field at the top provides the answer: 5.17.0. This would be Plasma 5.17.0, which is not released yet, so it&apos;s no surprise that you don&apos;t have the fix yet. :) Once Plasma 5.17 is released and your distro of choice provides it to you, you&apos;ll get the fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1878944</commentid>
    <comment_count>14</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2019-09-08 11:35:01 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #13)
&gt; The &quot;version fixed in&quot; field at the top provides the answer: 5.17.0. This
&gt; would be Plasma 5.17.0, which is not released yet, so it&apos;s no surprise that
&gt; you don&apos;t have the fix yet. :) Once Plasma 5.17 is released and your distro
&gt; of choice provides it to you, you&apos;ll get the fix.

Thanks for the info. We will fix it over puppet. Thanks :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104629</commentid>
    <comment_count>15</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2022-02-14 19:57:16 +0000</bug_when>
    <thetext>With Plasma 5.24.0 this bug is back again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104671</commentid>
    <comment_count>16</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-14 22:16:05 +0000</bug_when>
    <thetext>That was a regression which hopefully we just fixed in 5.24.1. Can you check again once that&apos;s released tomorrow?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104813</commentid>
    <comment_count>17</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2022-02-15 08:49:03 +0000</bug_when>
    <thetext>Thanks for the reply. I test it :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105201</commentid>
    <comment_count>18</comment_count>
    <who name="Geno">spider.gaming</who>
    <bug_when>2022-02-16 02:32:22 +0000</bug_when>
    <thetext>(In reply to Nate Graham from comment #16)
&gt; That was a regression which hopefully we just fixed in 5.24.1. Can you check
&gt; again once that&apos;s released tomorrow?

So glad I&apos;ve finally found a bug report for this issue, really hard to find it without being able to use specific terms. I thought it was an issue on my end when I updated to 5.24.0 about a week ago.

Thanks also boospy for reporting that the issue is back, I can confirm that I also have this issue. In my case Steam seems to always activate it&apos;s menu.

I&apos;ve updated today to 5.24.1 on EndeavourOS, and after a restart I still have this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2105490</commentid>
    <comment_count>19</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2022-02-16 19:11:50 +0000</bug_when>
    <thetext>I can confirm. The exists on 5.24.1 too. The behavior has changed a little. Right-click menu on telegram closes immediately when releasing the mouse button. And the right click on Zoiper (Voipclient) now works again and I don&apos;t have to xkill the program anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106983</commentid>
    <comment_count>20</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-02-21 21:29:06 +0000</bug_when>
    <thetext>*** Bug 450287 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107023</commentid>
    <comment_count>21</comment_count>
    <who name="Stefan Zurucker">s.zb</who>
    <bug_when>2022-02-21 22:36:17 +0000</bug_when>
    <thetext>I can reproduce the issue under Plasma 5.24.1 on X11, but it doesn&apos;t seem to occur in a Wayland session (KDE Neon).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107334</commentid>
    <comment_count>22</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-02-22 21:17:19 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1484</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107336</commentid>
    <comment_count>23</comment_count>
    <who name="Konrad Materka">materka</who>
    <bug_when>2022-02-22 21:17:44 +0000</bug_when>
    <thetext>*** Bug 450429 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107339</commentid>
    <comment_count>24</comment_count>
    <who name="Konrad Materka">materka</who>
    <bug_when>2022-02-22 21:18:42 +0000</bug_when>
    <thetext>*** Bug 449877 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107374</commentid>
    <comment_count>25</comment_count>
    <who name="Geno">spider.gaming</who>
    <bug_when>2022-02-22 23:59:05 +0000</bug_when>
    <thetext>I still have this issue on 5.24.2, I&apos;m running on X11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107917</commentid>
    <comment_count>26</comment_count>
    <who name="Konrad Materka">materka</who>
    <bug_when>2022-02-25 08:40:48 +0000</bug_when>
    <thetext>Git commit a02d1ca27b577607aa36d038372b3ec39e2376d4 by Konrad Materka.
Committed on 24/02/2022 at 21:48.
Pushed by fusionfuture into branch &apos;master&apos;.

applets/systemtray: Do not open context menu on mouse pressed for SNI

The prefered is to show context menu on mouse pressed event, not click,
but this causes few issues for SNI.

Some legacy applications still relies on XEmbed to show tray icon.
We use xembedsniproxy to relay the mouse press signals to the XEmbed client
but some applications (including GTK) validate the mouse state.
Mouse released state is expected, but as it is still pressed context
menu does not show.
FIXED-IN: 5.24.3

M  +0    -3    applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +7    -0    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/a02d1ca27b577607aa36d038372b3ec39e2376d4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107918</commentid>
    <comment_count>27</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2022-02-25 08:41:22 +0000</bug_when>
    <thetext>Git commit a9d5ea2afd33ee4fb51b6caf0af5a902a3d81352 by Fushan Wen, on behalf of Konrad Materka.
Committed on 25/02/2022 at 08:41.
Pushed by fusionfuture into branch &apos;Plasma/5.24&apos;.

applets/systemtray: Do not open context menu on mouse pressed for SNI

The prefered is to show context menu on mouse pressed event, not click,
but this causes few issues for SNI.

Some legacy applications still relies on XEmbed to show tray icon.
We use xembedsniproxy to relay the mouse press signals to the XEmbed client
but some applications (including GTK) validate the mouse state.
Mouse released state is expected, but as it is still pressed context
menu does not show.
FIXED-IN: 5.24.3


(cherry picked from commit a02d1ca27b577607aa36d038372b3ec39e2376d4)

M  +0    -3    applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +7    -0    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://invent.kde.org/plasma/plasma-workspace/commit/a9d5ea2afd33ee4fb51b6caf0af5a902a3d81352</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110486</commentid>
    <comment_count>28</comment_count>
    <who name="Geno">spider.gaming</who>
    <bug_when>2022-03-10 02:48:58 +0000</bug_when>
    <thetext>Updated to 5.24.3 yesterday and it seems to have solved the issue with Steam and Discord for me. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110613</commentid>
    <comment_count>29</comment_count>
    <who name="boospy">linux</who>
    <bug_when>2022-03-10 19:23:42 +0000</bug_when>
    <thetext>Yes it works now. Very thanks. Good work! :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110644</commentid>
    <comment_count>30</comment_count>
    <who name="Nick Stefanov">mo78</who>
    <bug_when>2022-03-10 22:47:36 +0000</bug_when>
    <thetext>No problems at all, thank you!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2113417</commentid>
    <comment_count>31</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-03-26 02:18:39 +0000</bug_when>
    <thetext>*** Bug 451596 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>