From d3a644d81cede9bfa7c12ddc023b9ca2d69fca3c Mon Sep 17 00:00:00 2001 From: Daniel Adolfsson Date: Thu, 13 Jul 2023 16:52:11 +0200 Subject: Dwindle: Make resize more intuitive (#2681) * improved resize * clang-format * rewrite * almost legacy behavior when using CORNER_NONE --- src/layout/MasterLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/MasterLayout.cpp') diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index b7e5a1bf..e0000914 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -294,7 +294,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { if ((WINDOWS < 2) && !centerMasterWindow) { PMASTERNODE->position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition; PMASTERNODE->size = Vector2D(PMONITOR->vecSize.x - PMONITOR->vecReservedTopLeft.x - PMONITOR->vecReservedBottomRight.x, - PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); + PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); applyNodeDataToWindow(PMASTERNODE); return; } else if (orientation == ORIENTATION_LEFT || orientation == ORIENTATION_RIGHT || (orientation == ORIENTATION_CENTER && STACKWINDOWS <= 1)) { @@ -590,7 +590,7 @@ bool CHyprMasterLayout::isWindowTiled(CWindow* pWindow) { return getNodeFromWindow(pWindow) != nullptr; } -void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, CWindow* pWindow) { +void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorner corner, CWindow* pWindow) { const auto PWINDOW = pWindow ? pWindow : g_pCompositor->m_pLastWindow; if (!g_pCompositor->windowValidMapped(PWINDOW)) -- cgit v1.2.3