<?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>428559</bug_id>
          
          <creation_ts>2020-11-01 13:10:41 +0000</creation_ts>
          <short_desc>Bad &quot;.desktop&quot; file can easily screw up all gtk icons</short_desc>
          <delta_ts>2023-07-25 00:19:37 +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>Task Manager and Icons-Only Task Manager widgets</component>
          <version>5.19.5</version>
          <rep_platform>Other</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></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Qu Wenruo">quwenruo.btrfs</reporter>
          <assigned_to name="Eike Hein">hein</assigned_to>
          <cc>justin.zobel</cc>
    
    <cc>nate</cc>
    
    <cc>nicolas.fella</cc>
    
    <cc>plasma-bugs-null</cc>
    
    <cc>qydwhotmail</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/5b59a1334c92d3edaf44b774df3fa608016913e8</cf_commitlink>
          <cf_versionfixedin>5.27.7</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1970692</commentid>
    <comment_count>0</comment_count>
    <who name="Qu Wenruo">quwenruo.btrfs</who>
    <bug_when>2020-11-01 13:10:41 +0000</bug_when>
    <thetext>SUMMARY
If installing a specific game (*) using steam with proton, proton would create a corrupted desktop file &quot;.desktop&quot; (exactly the name), to corrupt all gtk app icons used in decoration and &quot;big icon&quot; alt-tab switcher.

The offending game is https://store.steampowered.com/app/1372300/Iwaihime/

But since the cause the &quot;.desktop&quot; in .local/share/applications, it doesn&apos;t need the game to do the trick.

STEPS TO REPRODUCE
1. Create file &quot;.local/share/applications/.desktop&quot; with whatever icon you like
2. Check the icon of the window decoration of any running gtk applications 
3. Check the icon of &quot;big icon&quot; alt-tab window

OBSERVED RESULT
Most GTK applications get wrong icon from the &quot;.desktop&quot; file.


EXPECTED RESULT
GTK applications still follow their original icon.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch
KDE Plasma Version: 5.20.2
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Maybe it&apos;s a bug in gtk icon cache? But strangely I only found the following icons get affects:
- GTK app icons in window decoration (if enabled)
- GTK app icons in big/small icon alt-tab task switcher

QT applications like konsole, dolphin doesn&apos;t get affected.

And of course, with that &quot;.desktop&quot; file renamed, everything comes back to normal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970868</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Zobel">justin.zobel</who>
    <bug_when>2020-11-01 23:55:13 +0000</bug_when>
    <thetext>It sounds like the issue to me is the bad .desktop file that Steam are providing, not a KDE issue. Perhaps they need to call the desktop file asterisk.desktop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970875</commentid>
    <comment_count>2</comment_count>
    <who name="Qu Wenruo">quwenruo.btrfs</who>
    <bug_when>2020-11-02 00:18:30 +0000</bug_when>
    <thetext>Yes, steam is the cause, but the problem is, shouldn&apos;t KDE be robust enough to detect such malfunctioning desktop file and don&apos;t allow it to corrupt other app&apos;s icon?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970876</commentid>
    <comment_count>3</comment_count>
    <who name="Justin Zobel">justin.zobel</who>
    <bug_when>2020-11-02 00:20:45 +0000</bug_when>
    <thetext>True I guess this could be solidified more to verify a .desktop file is within spec and if not, ignore it completely.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970879</commentid>
    <comment_count>4</comment_count>
    <who name="Qu Wenruo">quwenruo.btrfs</who>
    <bug_when>2020-11-02 00:28:39 +0000</bug_when>
    <thetext>I guess that&apos;s the correct way to go.

Although the only invalid part is the file name. &quot;.desktop&quot;.
Everything else is pretty OK, and I&apos;m not sure if the name &quot;.desktop&quot; really breaks any spec though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971010</commentid>
    <comment_count>5</comment_count>
    <who name="Nicolas Fella">nicolas.fella</who>
    <bug_when>2020-11-02 10:02:10 +0000</bug_when>
    <thetext>I would guess this has to do with how libtaskmanager resolves/guesses the desktop entry for a window, but I haven&apos;t looked closer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2217080</commentid>
    <comment_count>6</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-03-17 16:45:44 +0000</bug_when>
    <thetext>Cannot reproduce in 5.27</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2242565</commentid>
    <comment_count>7</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-07-24 23:59:32 +0000</bug_when>
    <thetext>Git commit 506fd06e5d07717bd0b52bdfc5970b181454228f by Fushan Wen.
Committed on 25/07/2023 at 01:43.
Pushed by fusionfuture into branch &apos;master&apos;.

libtaskmanager: skip empty appId when matching &apos;*.appId.desktop&apos;

When appId is empty, &quot;*..desktop&quot; can be a match. Some games like Touhou
tend to add an extra dot at the end of the desktop name, which causes
Marisa to exist everywhere.
Related: bug 472576
FIXED-IN: 5.27.7

A  +8    -0    libtaskmanager/autotests/data/applications/marisa..desktop
M  +3    -0    libtaskmanager/autotests/tasktoolstest.cpp
M  +1    -1    libtaskmanager/tasktools.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/506fd06e5d07717bd0b52bdfc5970b181454228f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2242568</commentid>
    <comment_count>8</comment_count>
    <who name="Fushan Wen">qydwhotmail</who>
    <bug_when>2023-07-25 00:19:37 +0000</bug_when>
    <thetext>Git commit 5b59a1334c92d3edaf44b774df3fa608016913e8 by Fushan Wen.
Committed on 25/07/2023 at 02:08.
Pushed by fusionfuture into branch &apos;Plasma/5.27&apos;.

libtaskmanager: skip empty appId when matching &apos;*.appId.desktop&apos;

When appId is empty, &quot;*..desktop&quot; can be a match. Some games like Touhou
tend to add an extra dot at the end of the desktop name, which causes
Marisa to exist everywhere.
Related: bug 472576
FIXED-IN: 5.27.7


(cherry picked from commit 506fd06e5d07717bd0b52bdfc5970b181454228f)

A  +8    -0    libtaskmanager/autotests/data/applications/marisa..desktop
M  +3    -0    libtaskmanager/autotests/tasktoolstest.cpp
M  +1    -1    libtaskmanager/tasktools.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/5b59a1334c92d3edaf44b774df3fa608016913e8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>