Fix org.telegram.desktop identification
ClosedPublic

Authored by apol on Wed, May 13, 5:54 PM.

Details

Summary

The code we have that adds .desktop at the end of the resource name did not take
into account that it might be the case that the application ends with .desktop
like it happens on telegram's desktop client

This patch looks for the file instead of just checking the name to account for
it. Otherwise the look up happens in KConfig.

Fixes flathub/org.telegram.desktop#27 on github

Test Plan

Tested locally, works.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Wed, May 13, 5:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptWed, May 13, 5:54 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
apol requested review of this revision.Wed, May 13, 5:54 PM
ngraham accepted this revision.Wed, May 13, 6:44 PM
This revision is now accepted and ready to land.Wed, May 13, 6:44 PM
This revision was automatically updated to reflect the committed changes.
zzag added a subscriber: zzag.Thu, May 14, 12:19 PM

Thank you for the fix.

zzag added a comment.Thu, May 14, 12:44 PM

@apol Shouldn't we also backport this patch to Plasma/5.18?

zzag added a comment.Thu, May 14, 1:13 PM

This change breaks an autotest

FAIL!  : TestXdgShellClient::testDesktopFileName() Compared values are not the same
   Actual   (iconChangedSpy.count()): 0
   Expected (1)                     : 1
   Loc: [/home/vlad/Workspace/KDE/src/kde/workspace/kwin/autotests/integration/xdgshellclient_test.cpp(830)]