Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

fix(domain): prevent `GetNextSiblingOfType` from including the container itself

Lars Bergercf31c16d9ddc
diff --git a/GlazeWM.Domain/Containers/Container.cs b/GlazeWM.Domain/Containers/Container.cs
index 2414a7f4..54c604cb 100644
--- a/GlazeWM.Domain/Containers/Container.cs
+++ b/GlazeWM.Domain/Containers/Container.cs
@@ -142,7 +142,7 @@ namespace GlazeWM.Domain.Containers
public Container GetNextSiblingOfType(Type type)
{
return SelfAndSiblings
- .Skip(Index)
+ .Skip(Index + 1)
.FirstOrDefault(container => type.IsAssignableFrom(container.GetType()));
}