1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-06 13:38:28 -04:00

workspaces: skip placeholders in findClosestWorkspace

related #2754
This commit is contained in:
bbedward
2026-07-05 11:26:38 -04:00
parent b6a27dc713
commit 78e823e23a
@@ -638,7 +638,7 @@ Item {
NiriService.switchToWorkspace(data.id); NiriService.switchToWorkspace(data.id);
break; break;
case "hyprland": case "hyprland":
if (data.id) { if (data.id && data.id !== -1) {
HyprlandService.focusWorkspace(hyprlandWorkspaceSelector(data)); HyprlandService.focusWorkspace(hyprlandWorkspaceSelector(data));
} }
break; break;
@@ -663,7 +663,7 @@ Item {
for (let i = 0; i < workspaceRepeater.count; i++) { for (let i = 0; i < workspaceRepeater.count; i++) {
const item = workspaceRepeater.itemAt(i); const item = workspaceRepeater.itemAt(i);
if (!item) if (!item || item.isPlaceholder)
continue; continue;
const center = item.mapToItem(root, item.width / 2, item.height / 2); const center = item.mapToItem(root, item.width / 2, item.height / 2);
const dist = isVertical ? Math.abs(localY - center.y) : Math.abs(localX - center.x); const dist = isVertical ? Math.abs(localY - center.y) : Math.abs(localX - center.x);