From e3027248470dab4553273368de85d0f4cf357f78 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sun, 26 Feb 2023 03:56:23 +0200 Subject: [PATCH] use corner cursors on resize (#1638) --- src/layout/IHyprLayout.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index fdfe74a2..9e9f873c 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -206,19 +206,23 @@ void IHyprLayout::onBeginDragWindow() { // get the grab corner if (m_vBeginDragXY.x < m_vBeginDragPositionXY.x + m_vBeginDragSizeXY.x / 2.0) { - if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) + if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) { m_eGrabbedCorner = CORNER_TOPLEFT; - else + g_pInputManager->setCursorImageUntilUnset("nw-resize"); + } else { m_eGrabbedCorner = CORNER_BOTTOMLEFT; + g_pInputManager->setCursorImageUntilUnset("sw-resize"); + } } else { - if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) + if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) { m_eGrabbedCorner = CORNER_TOPRIGHT; - else + g_pInputManager->setCursorImageUntilUnset("ne-resize"); + } else { m_eGrabbedCorner = CORNER_BOTTOMRIGHT; + g_pInputManager->setCursorImageUntilUnset("se-resize"); + } } - g_pInputManager->setCursorImageUntilUnset("grab"); - g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); g_pKeybindManager->shadowKeybinds();