<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4600" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Looking at the code in qxcbintegration.cpp, it seems that WM_CLASS is in fact derived from</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">-name xcb-specific commandline argument, let's ignore that</li>
<li class="remarkup-list-item">$RESOURCE_NAME env var, no idea what that is, let's ignore that</li>
<li class="remarkup-list-item">the basename of argv[0], i.e. the name of the executable. kmail's executable is called kmail.</li>
</ol>

<p>This is then followed by QCoreApplication::applicationName which is indeed "kmail2".</p>

<p>So we end up with WM_CLASS(STRING) = "kmail", "kmail2", as confirmed by xprop.</p>

<p>I notice that e.g. firefox has WM_CLASS(STRING) = "Navigator", "Firefox". So the second string is the one that matters?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4600" rel="noreferrer">https://phabricator.kde.org/D4600</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>dfaure, hein<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>