diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-14 17:00:35 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-04-14 17:00:35 +0200 |
| commit | 3e36f1c42c2cd561ac84c78c20261f950ee37269 (patch) | |
| tree | 82bbc8649afbf2e5e4da727b2a410b47f7f27ad9 /src/layout/DwindleLayout.cpp | |
| parent | 75af34da96b80a3d228a25e8c75ba1137df9e058 (diff) | |
renderer fixes
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index aeddbb8f..2af7a2e2 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -412,6 +412,8 @@ void CHyprDwindleLayout::onBeginDragWindow() { m_vBeginDragPositionXY = DRAGGINGWINDOW->m_vRealPosition; m_vBeginDragSizeXY = DRAGGINGWINDOW->m_vRealSize; m_vLastDragXY = m_vBeginDragXY; + + g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); } void CHyprDwindleLayout::onEndDragWindow() { @@ -422,6 +424,7 @@ void CHyprDwindleLayout::onEndDragWindow() { changeWindowFloatingMode(DRAGGINGWINDOW); } + g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); } void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) { @@ -433,8 +436,14 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) { 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); + + if (abs(TICKDELTA.x) < 1.f && abs(TICKDELTA.y) < 1.f) + return; + m_vLastDragXY = mousePos; + g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); + if (g_pInputManager->dragButton == BTN_LEFT) { DRAGGINGWINDOW->m_vRealPosition = m_vBeginDragPositionXY + DELTA; DRAGGINGWINDOW->m_vEffectivePosition = DRAGGINGWINDOW->m_vRealPosition; @@ -515,6 +524,8 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) { DRAGGINGWINDOW->m_iMonitorID = PMONITOR->ID; DRAGGINGWINDOW->m_iWorkspaceID = PMONITOR->activeWorkspace; } + + g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); } void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) { |
