summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-05-15 15:16:06 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-05-15 15:16:06 +0100
commit824813fc6a6b4bfaac2edb791bf3a429a9990d4e (patch)
treec1ec8e4ed76ae82fda2711b2afa96a46f5875d34 /src/managers/KeybindManager.cpp
parent7c207243e41b5b4f35d790767ad2e21eba1b7a0b (diff)
internal: remove check for negative exact vector args
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index c0ed8d53..a502f147 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -1553,6 +1553,9 @@ void CKeybindManager::resizeActive(std::string args) {
const auto SIZ = g_pCompositor->parseWindowVectorArgsRelative(args, g_pCompositor->m_pLastWindow->m_vRealSize.goalv());
+ if (SIZ.x < 1 || SIZ.y < 1)
+ return;
+
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(SIZ - g_pCompositor->m_pLastWindow->m_vRealSize.goalv());
if (g_pCompositor->m_pLastWindow->m_vRealSize.goalv().x > 1 && g_pCompositor->m_pLastWindow->m_vRealSize.goalv().y > 1)
@@ -1605,6 +1608,9 @@ void CKeybindManager::resizeWindow(std::string args) {
const auto SIZ = g_pCompositor->parseWindowVectorArgsRelative(MOVECMD, PWINDOW->m_vRealSize.goalv());
+ if (SIZ.x < 1 || SIZ.y < 1)
+ return;
+
g_pLayoutManager->getCurrentLayout()->resizeActiveWindow(SIZ - PWINDOW->m_vRealSize.goalv(), PWINDOW);
if (PWINDOW->m_vRealSize.goalv().x > 1 && PWINDOW->m_vRealSize.goalv().y > 1)