aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-27 23:41:22 +0000
committerVaxry <[email protected]>2024-10-27 23:41:22 +0000
commit6cf193e1662f6f750e964a3e174ae017246b4d48 (patch)
tree2f257e59143f2bb8473ec397badeb9ff3e164db8
parentb1120ec4334abdb57677354dfcdcf48b6c34f397 (diff)
downloadHyprland-6cf193e1662f6f750e964a3e174ae017246b4d48.tar.gz
Hyprland-6cf193e1662f6f750e964a3e174ae017246b4d48.zip
layout: don't snap to self and allow same-pid snaps
fixes #8255
-rw-r--r--src/layout/IHyprLayout.cpp3
1 files changed, 1 insertions, 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();