mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-03 13:41:59 -07:00
Added drag to move window
This commit is contained in:
@@ -324,12 +324,25 @@ void CHyprDwindleLayout::onBeginDragWindow() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DRAGGINGWINDOW->m_bIsFloating) {
|
||||
DRAGGINGWINDOW->m_bDraggingTiled = true;
|
||||
changeWindowFloatingMode(DRAGGINGWINDOW);
|
||||
} else {
|
||||
DRAGGINGWINDOW->m_bDraggingTiled = false;
|
||||
}
|
||||
|
||||
m_vBeginDragXY = g_pInputManager->getMouseCoordsInternal();
|
||||
m_vBeginDragPositionXY = DRAGGINGWINDOW->m_vRealPosition;
|
||||
m_vBeginDragSizeXY = DRAGGINGWINDOW->m_vRealSize;
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onEndDragWindow() {
|
||||
const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow;
|
||||
|
||||
if (DRAGGINGWINDOW->m_bDraggingTiled)
|
||||
changeWindowFloatingMode(DRAGGINGWINDOW);
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
||||
const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow;
|
||||
|
||||
|
Reference in New Issue
Block a user