mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 20:45:59 +01:00
use corner cursors on resize (#1638)
This commit is contained in:
parent
edd0a141de
commit
e302724847
1 changed files with 10 additions and 6 deletions
|
@ -206,18 +206,22 @@ 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
|
||||
m_eGrabbedCorner = CORNER_BOTTOMLEFT;
|
||||
g_pInputManager->setCursorImageUntilUnset("nw-resize");
|
||||
} else {
|
||||
if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0)
|
||||
m_eGrabbedCorner = CORNER_TOPRIGHT;
|
||||
else
|
||||
m_eGrabbedCorner = CORNER_BOTTOMRIGHT;
|
||||
m_eGrabbedCorner = CORNER_BOTTOMLEFT;
|
||||
g_pInputManager->setCursorImageUntilUnset("sw-resize");
|
||||
}
|
||||
} else {
|
||||
if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) {
|
||||
m_eGrabbedCorner = CORNER_TOPRIGHT;
|
||||
g_pInputManager->setCursorImageUntilUnset("ne-resize");
|
||||
} else {
|
||||
m_eGrabbedCorner = CORNER_BOTTOMRIGHT;
|
||||
g_pInputManager->setCursorImageUntilUnset("se-resize");
|
||||
}
|
||||
}
|
||||
|
||||
g_pInputManager->setCursorImageUntilUnset("grab");
|
||||
|
||||
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||
|
||||
|
|
Loading…
Reference in a new issue