From 26aabb14e38872352fa3bc7500d68b70d78ffa1f Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Sat, 16 Sep 2023 00:28:11 +0100 Subject: [PATCH] refactor modified: src/layout/IHyprLayout.cpp Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> --- src/layout/IHyprLayout.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 4ecdf39a..1fa5db8c 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -260,7 +260,12 @@ void IHyprLayout::onEndDragWindow() { g_pInputManager->refocus(); changeWindowFloatingMode(DRAGGINGWINDOW); DRAGGINGWINDOW->m_vLastFloatingSize = m_vDraggingWindowOriginalFloatSize; - } else if (g_pInputManager->dragMode == MBIND_MOVE) { + } + + g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); + g_pCompositor->focusWindow(DRAGGINGWINDOW); + + if (g_pInputManager->dragMode == MBIND_MOVE && DRAGGINGWINDOW->m_bIsFloating) { CWindow* pWindow = g_pCompositor->windowFloatingFromCursorIgnore(DRAGGINGWINDOW); g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); @@ -293,12 +298,8 @@ void IHyprLayout::onEndDragWindow() { recalculateWindow(DRAGGINGWINDOW); g_pCompositor->focusWindow(DRAGGINGWINDOW); - return; } } - - g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); - g_pCompositor->focusWindow(DRAGGINGWINDOW); } void IHyprLayout::onMouseMove(const Vector2D& mousePos) {