mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:06:00 +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
|
// get the grab corner
|
||||||
if (m_vBeginDragXY.x < m_vBeginDragPositionXY.x + m_vBeginDragSizeXY.x / 2.0) {
|
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;
|
m_eGrabbedCorner = CORNER_TOPLEFT;
|
||||||
else
|
g_pInputManager->setCursorImageUntilUnset("nw-resize");
|
||||||
m_eGrabbedCorner = CORNER_BOTTOMLEFT;
|
|
||||||
} else {
|
} else {
|
||||||
if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0)
|
m_eGrabbedCorner = CORNER_BOTTOMLEFT;
|
||||||
m_eGrabbedCorner = CORNER_TOPRIGHT;
|
g_pInputManager->setCursorImageUntilUnset("sw-resize");
|
||||||
else
|
}
|
||||||
m_eGrabbedCorner = CORNER_BOTTOMRIGHT;
|
} 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);
|
g_pHyprRenderer->damageWindow(DRAGGINGWINDOW);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue