mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-09 06:58:29 -04:00
feat(dock): cycle grouped app windows (#3023)
(cherry picked from commit 80bad610ce)
This commit is contained in:
committed by
dms-ci[bot]
parent
8200c72f8c
commit
83e2b89393
@@ -168,6 +168,25 @@ Item {
|
|||||||
Qt.callLater(() => waylandToplevel.activate());
|
Qt.callLater(() => waylandToplevel.activate());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function cycleGroupedToplevels() {
|
||||||
|
const toplevels = getGroupedToplevels();
|
||||||
|
if (toplevels.length === 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let currentIndex = -1;
|
||||||
|
for (let i = 0; i < toplevels.length; i++) {
|
||||||
|
if (toplevels[i].activated) {
|
||||||
|
currentIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const nextToplevel = toplevels[(currentIndex + 1) % toplevels.length];
|
||||||
|
if (restoreSpecialWorkspaceWindow(nextToplevel))
|
||||||
|
return;
|
||||||
|
nextToplevel.activate();
|
||||||
|
}
|
||||||
onIsHoveredChanged: {
|
onIsHoveredChanged: {
|
||||||
if (mouseArea.pressed || dragging)
|
if (mouseArea.pressed || dragging)
|
||||||
return;
|
return;
|
||||||
@@ -343,9 +362,8 @@ Item {
|
|||||||
return;
|
return;
|
||||||
groupedToplevel.activate();
|
groupedToplevel.activate();
|
||||||
}
|
}
|
||||||
} else if (contextMenu) {
|
} else {
|
||||||
const shouldHidePin = appData.appId === "org.quickshell" || appData.appId === "com.danklinux.dms";
|
cycleGroupedToplevels();
|
||||||
contextMenu.showForButton(root, appData, root.height + 25, shouldHidePin, cachedDesktopEntry, parentDockScreen, dockApps);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user