<?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>448050</bug_id>
          
          <creation_ts>2022-01-07 10:13:54 +0000</creation_ts>
          <short_desc>cannot restore Gtk2 application from tray On wayland</short_desc>
          <delta_ts>2023-02-15 18:17:07 +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.23.4</version>
          <rep_platform>Manjaro</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=456168</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>wayland-only</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Svyatoslav Timofeev">timofeevsv1989</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>ahmed.com</cc>
    
    <cc>bugseforuns</cc>
    
    <cc>materka</cc>
    
    <cc>nate</cc>
    
    <cc>qydwhotmail</cc>
    
    <cc>ryu.ketsueki</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/commit/46cb1454335cd20b5ce705ed3c1205843119055b</cf_commitlink>
          <cf_versionfixedin>5.27</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2090676</commentid>
    <comment_count>0</comment_count>
    <who name="Svyatoslav Timofeev">timofeevsv1989</who>
    <bug_when>2022-01-07 10:13:54 +0000</bug_when>
    <thetext>SUMMARY
***
cannot restore Gtk2 application from tray (Tixati) on wayland
***


STEPS TO REPRODUCE
1. Open Tixati
2. Set &quot;Close to tray&quot;
3. Close
4. You cannot restore its window from tray icon

OBSERVED RESULT
Cannot restore Tixati window from tray icon on wayland

EXPECTED RESULT
Normal X11 behavior

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Manjaro Testing, Plasma 5.23.4

KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2092682</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-01-12 17:28:52 +0000</bug_when>
    <thetext>Can reproduce with Hexchat.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2092845</commentid>
    <comment_count>2</comment_count>
    <who name="Konrad Materka">materka</who>
    <bug_when>2022-01-12 21:30:50 +0000</bug_when>
    <thetext>Is right click working?

Can you share logs when xembedsniproxy is run with debug logging enabled? You can run it from console:

killall xembedsniproxy; QT_LOGGING_RULES=&quot;kde.xembedsniproxy=true&quot; xembedsniproxy

With NVIDIA card I had no luck running Wayland (so far)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2093164</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-01-13 17:53:22 +0000</bug_when>
    <thetext>It&apos;s not working. Here&apos;s the output:

kde.xembedsniproxy: Received click 3 with passed x*y 8 678
kde.xembedsniproxy: Received click 3 with passed x*y 8 678
kde.xembedsniproxy: Received click 3 with passed x*y 9 678
kde.xembedsniproxy: Received click 3 with passed x*y 9 678
kde.xembedsniproxy: Received click 1 with passed x*y 33 686
kde.xembedsniproxy: Received click 3 with passed x*y 27 691
kde.xembedsniproxy: Received click 3 with passed x*y 25 691
kde.xembedsniproxy: Received click 3 with passed x*y 25 688
kde.xembedsniproxy: Received click 3 with passed x*y 25 688
kde.xembedsniproxy: Received click 3 with passed x*y 25 688</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2097304</commentid>
    <comment_count>4</comment_count>
    <who name="Konrad Materka">materka</who>
    <bug_when>2022-01-23 21:30:49 +0000</bug_when>
    <thetext>I still can&apos;t run Wayland, but maybe this is a good workaround:

killall xembedsniproxy; wmsystemtray --non-wmaker --bgcolor white

This will show XEmbed tray icons in a separate window. All modern tray items (SNI) will work as currently, unimpacted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2123840</commentid>
    <comment_count>5</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-05-16 16:53:04 +0000</bug_when>
    <thetext>Can reproduce with Tixati 2.89 torrent client. Even right-click does not work while Tixati is closed in system tray.
And when Tixati window is focused, right clicks on its systray icon do no work consistently. I need to position mouse pointer in specific positions to right-click to work. Very annoying.

Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2142896</commentid>
    <comment_count>6</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-08-01 19:02:53 +0000</bug_when>
    <thetext>*** Bug 457376 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2146636</commentid>
    <comment_count>7</comment_count>
    <who name="">ryu.ketsueki</who>
    <bug_when>2022-08-18 17:56:27 +0000</bug_when>
    <thetext>I noticed this issue happening with many Wine applications as well. I could open a bug report on their side to see if this deprecated proxy can be replaced with a new one but I&apos;m not sure what exactly needs to be done so it can be fixed on Wine&apos;s side. The workaround won&apos;t work with me because wmsystemtray is not in the repos of my current distro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200854</commentid>
    <comment_count>8</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-01-23 12:49:21 +0000</bug_when>
    <thetext>https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2503</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2202534</commentid>
    <comment_count>9</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-01-27 18:03:51 +0000</bug_when>
    <thetext>Git commit 033b9dd14c6c807990f780858e543ad8eec0e913 by Fushan Wen.
Committed on 27/01/2023 at 15:37.
Pushed by fusionfuture into branch &apos;master&apos;.

applets/systemtray: fix xembed icon not receiving click events when screen scale &gt; 1 on Wayland

On Wayland, when using &quot;Scaled by application&quot;, mapToGlobal will return a scaled position
which is unusable in SNIProxy::sendClick. This fixes the bug by
multiplying the position  by devicePixelRatio.
Related: bug 456168
FIXED-IN: 5.27

M  +10   -0    CMakeLists.txt
M  +14   -0    applets/systemtray/CMakeLists.txt
M  +120  -8    applets/systemtray/systemtray.cpp
M  +11   -0    applets/systemtray/systemtray.h
A  +1    -0    config-WaylandProtocols.h.cmake

https://invent.kde.org/plasma/plasma-workspace/commit/033b9dd14c6c807990f780858e543ad8eec0e913</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2202587</commentid>
    <comment_count>10</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-01-27 21:43:14 +0000</bug_when>
    <thetext>Git commit 46cb1454335cd20b5ce705ed3c1205843119055b by Fushan Wen.
Committed on 27/01/2023 at 21:43.
Pushed by fusionfuture into branch &apos;cherry-pick-033b9dd1&apos;.

applets/systemtray: fix xembed icon not receiving click events when screen scale &gt; 1 on Wayland

On Wayland, when using &quot;Scaled by application&quot;, mapToGlobal will return a scaled position
which is unusable in SNIProxy::sendClick. This fixes the bug by
multiplying the position  by devicePixelRatio.
Related: bug 456168
FIXED-IN: 5.27


(cherry picked from commit 033b9dd14c6c807990f780858e543ad8eec0e913)

M  +10   -0    CMakeLists.txt
M  +14   -0    applets/systemtray/CMakeLists.txt
M  +120  -8    applets/systemtray/systemtray.cpp
M  +11   -0    applets/systemtray/systemtray.h
A  +1    -0    config-WaylandProtocols.h.cmake

https://invent.kde.org/plasma/plasma-workspace/commit/46cb1454335cd20b5ce705ed3c1205843119055b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2204429</commentid>
    <comment_count>11</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2023-02-02 22:06:06 +0000</bug_when>
    <thetext>*** Bug 457376 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208174</commentid>
    <comment_count>12</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2023-02-15 18:14:48 +0000</bug_when>
    <thetext>This bug is not completely solved with Tixati and Hexchat. Nothing happens most the times I click on their systray icons.

Operating System: Arch Linux 
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208175</commentid>
    <comment_count>13</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-02-15 18:17:07 +0000</bug_when>
    <thetext>Can confirm. Happens on Wayland because the window is not properly lowered. Please report a new bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>