<table><tr><td style="">hein created this revision.<br />hein added reviewers: Plasma, davidedmundson.<br />hein added a subscriber: plasma-devel.<br />Restricted Application added a project: Plasma.
</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/D4469" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Alphabetical sorting currently compares a concatenation of<br />
"AppName" (determined by heuristic) and Qt::DisplayRole (usually<br />
the window title) using QString::localeAwareSort. This reflects<br />
that the motivation behind alphabetical sorting is generally to<br />
keep windows belonging to the same app grouped together and then<br />
order those groups alphabetically.</p>

<p>The current code achieves this, but the particulars turn out to<br />
negatively impact users of multi-windowed apps that frequently<br />
change window titles in ways that impact sorting, particularly<br />
tabbed web browsers. Switching between tabs may change the order<br />
of browser windows on the Task Manager. Multiple instances of<br />
feedback suggest this is jarring and unexpected, despite<br />
technically being alphabetical.</p>

<p>This patch changes behavior as follows:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Instead of comparing "<App Name><DisplayRole>" it will try to only compare "<App Name>", falling back to "<DisplayRole>" if the app name can't be determined.</li>
<li class="remarkup-list-item">If two tasks compare to equal in the above, it will fall back to source model row order, i.e. creation/append sorting.</li>
</ol>

<p>This still achieves the primary goal laid out above while<br />
keeping the sort order within an app "group" stable when using<br />
alphabetical sorting.</p>

<p>An alternative means to achive this behavior would be via existing<br />
Task Manager settings. To wit:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Enable grouping</li>
<li class="remarkup-list-item">Disable group popups, so groups are instead maintained inline on the widget</li>
</ol>

<p>I'm actually considering suggesting the above (plus changing<br />
sorting to Manual) as new default settings for 5.10 - but in<br />
the meantime it still makes sense to tune the alphabetical<br />
sorting mode in this way, and put the improved behavior into<br />
5.8 and 5.9 to address user feedback earlier.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>Plasma/5.8</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4469" rel="noreferrer">https://phabricator.kde.org/D4469</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>libtaskmanager/tasksmodel.cpp</div></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>hein, Plasma, davidedmundson<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>