Added drag to move window
This commit is contained in:
parent
df6a3c6877
commit
462781b16f
5 changed files with 27 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue