From fd43d2bea7e8d6e0915c7c2838554cde5356f54f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 9 Dec 2022 17:08:04 +0000 Subject: [PATCH] fix drag resizing on special ws-es --- src/layout/DwindleLayout.cpp | 2 +- src/layout/IHyprLayout.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 78545c05..9cac70d5 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -635,7 +635,7 @@ void CHyprDwindleLayout::resizeActiveWindow(const Vector2D& pixResize, CWindow* const auto PNODE = getNodeFromWindow(PWINDOW); if (!PNODE) { - PWINDOW->m_vRealSize = Vector2D(std::max((PWINDOW->m_vRealSize.goalv() + pixResize).x, 20.0), std::max((PWINDOW->m_vRealSize.goalv() + pixResize).y, 20.0)); + PWINDOW->m_vRealSize = Vector2D(std::max((PWINDOW->m_vRealSize.goalv() + pixResize).x, 20.0), std::max((PWINDOW->m_vRealSize.goalv() + pixResize).y, 20.0)); PWINDOW->updateWindowDecos(); return; } diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index a5ff761e..f0ca10df 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -205,6 +205,8 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) { return; } + const auto SPECIAL = g_pCompositor->isWorkspaceSpecial(DRAGGINGWINDOW->m_iWorkspaceID); + const auto DELTA = Vector2D(mousePos.x - m_vBeginDragXY.x, mousePos.y - m_vBeginDragXY.y); const auto TICKDELTA = Vector2D(mousePos.x - m_vLastDragXY.x, mousePos.y - m_vLastDragXY.y); @@ -271,7 +273,7 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) { // and check its monitor const auto PMONITOR = g_pCompositor->getMonitorFromVector(middle); - if (PMONITOR) { + if (PMONITOR && !SPECIAL) { DRAGGINGWINDOW->m_iMonitorID = PMONITOR->ID; DRAGGINGWINDOW->moveToWorkspace(PMONITOR->activeWorkspace);