diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-09-19 19:04:48 +0100 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-09-19 19:04:48 +0100 |
| commit | c24b45671abe1f768e9b5e0a35930ad76e2d8bcc (patch) | |
| tree | 24ac1b68bb8fc8c7cc37fb45aa17551270183026 /src/layout/IHyprLayout.cpp | |
| parent | 85c7aaf15529dbff5af3460c099bcba2742b7652 (diff) | |
mouse binds overhaul
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 1cc7f7db..8984a107 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -137,7 +137,7 @@ void IHyprLayout::onBeginDragWindow() { DRAGGINGWINDOW->m_bDraggingTiled = false; if (!DRAGGINGWINDOW->m_bIsFloating) { - if (g_pInputManager->dragButton == BTN_LEFT) { + if (g_pInputManager->dragMode == MBIND_MOVE) { changeWindowFloatingMode(DRAGGINGWINDOW); DRAGGINGWINDOW->m_bIsFloating = true; DRAGGINGWINDOW->m_bDraggingTiled = true; @@ -192,11 +192,11 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) { g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); - if (g_pInputManager->dragButton == BTN_LEFT) { + if (g_pInputManager->dragMode == MBIND_MOVE) { DRAGGINGWINDOW->m_vRealPosition.setValueAndWarp(m_vBeginDragPositionXY + DELTA); g_pXWaylandManager->setWindowSize(DRAGGINGWINDOW, DRAGGINGWINDOW->m_vRealSize.goalv()); - } else { + } else if (g_pInputManager->dragMode == MBIND_RESIZE) { if (DRAGGINGWINDOW->m_bIsFloating) { const auto MAXSIZE = g_pXWaylandManager->getMaxSizeForWindow(DRAGGINGWINDOW); |
