1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 05:12:05 -04:00

running apps: fix ordering on niri

This commit is contained in:
bbedward
2026-02-19 20:45:50 -05:00
parent 1ad8b627f1
commit a4137c57c1
2 changed files with 46 additions and 105 deletions

View File

@@ -138,15 +138,13 @@ BasePill {
readonly property real iconCellSize: Theme.barIconSize(root.barThickness, undefined, root.barConfig?.noBackground) + 6
readonly property string focusedAppId: {
const toplevels = CompositorService.sortedToplevels;
if (!toplevels)
if (!sortedToplevels || sortedToplevels.length === 0)
return "";
let result = "";
for (let i = 0; i < toplevels.length; i++) {
if (toplevels[i].activated)
result = toplevels[i].appId || "";
for (let i = 0; i < sortedToplevels.length; i++) {
if (sortedToplevels[i].activated)
return sortedToplevels[i].appId || "";
}
return result;
return "";
}
visible: windowCount > 0