Fix org.telegram.desktop identification
ClosedPublic

Authored by apol on May 13 2020, 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.May 13 2020, 5:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptMay 13 2020, 5:54 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
apol requested review of this revision.May 13 2020, 5:54 PM
ngraham accepted this revision.May 13 2020, 6:44 PM
This revision is now accepted and ready to land.May 13 2020, 6:44 PM
This revision was automatically updated to reflect the committed changes.
zzag added a subscriber: zzag.May 14 2020, 12:19 PM

Thank you for the fix.

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

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

zzag added a comment.May 14 2020, 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)]