mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 18:29:50 +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,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();
|
||||
|
|
Loading…
Reference in a new issue