From 6cf193e1662f6f750e964a3e174ae017246b4d48 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 27 Oct 2024 23:41:22 +0000 Subject: [PATCH] layout: don't snap to self and allow same-pid snaps fixes #8255 --- src/layout/IHyprLayout.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 30b5632c..bd81500d 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -429,11 +429,10 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA CBox sourceBox = CBox{sourcePos, sourceSize}.expand(DRAGGINGBORDERSIZE); if (*SNAPWINDOWGAP) { - const auto PID = DRAGGINGWINDOW->getPID(); const auto WSID = DRAGGINGWINDOW->workspaceID(); for (auto& other : g_pCompositor->m_vWindows) { - if (other->workspaceID() != WSID || other->getPID() == PID || !other->m_bIsMapped || other->m_bFadingOut || other->isX11OverrideRedirect()) + if (other == DRAGGINGWINDOW || other->workspaceID() != WSID || !other->m_bIsMapped || other->m_bFadingOut || other->isX11OverrideRedirect()) continue; const int BORDERSIZE = other->getRealBorderSize();