diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-14 16:43:30 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-14 16:43:30 +0200 |
| commit | 694f4433a2b6083cef5a4f43e974f9c70b9857af (patch) | |
| tree | ece23ce054ccb93a79c538715ed63eeda6c13479 /src/layout/DwindleLayout.cpp | |
| parent | 8f0aa6c941733ac5b540de27909b9b279be61aae (diff) | |
Added animation style and style slide
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index f1d327f0..620143f6 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -278,9 +278,6 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) { applyNodeDataToWindow(PNODE); applyNodeDataToWindow(OPENINGON); } - - pWindow->m_vRealPosition.setValue(PNODE->position + PNODE->size / 2.f); - pWindow->m_vRealSize.setValue(Vector2D(5,5)); } void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) { @@ -341,10 +338,6 @@ void CHyprDwindleLayout::onWindowRemoved(CWindow* pWindow) { m_lDwindleNodesData.remove(*PPARENT); m_lDwindleNodesData.remove(*PNODE); - - // jump back like it jumps in - //pWindow->m_vEffectivePosition = pWindow->m_vEffectivePosition + ((pWindow->m_vEffectiveSize - Vector2D(5, 5)) * 0.5f); - // pWindow->m_vEffectiveSize = Vector2D(5, 5); } void CHyprDwindleLayout::recalculateMonitor(const int& monid) { @@ -473,10 +466,10 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) { // get some data about our window const auto PNODE = getNodeFromWindow(DRAGGINGWINDOW); const auto PMONITOR = g_pCompositor->getMonitorFromID(DRAGGINGWINDOW->m_iMonitorID); - const bool DISPLAYLEFT = STICKS(DRAGGINGWINDOW->m_vPosition.x, PMONITOR->vecPosition.x); - const bool DISPLAYRIGHT = STICKS(DRAGGINGWINDOW->m_vPosition.x + DRAGGINGWINDOW->m_vSize.x, PMONITOR->vecPosition.x + PMONITOR->vecSize.x); - const bool DISPLAYTOP = STICKS(DRAGGINGWINDOW->m_vPosition.y, PMONITOR->vecPosition.y); - const bool DISPLAYBOTTOM = STICKS(DRAGGINGWINDOW->m_vPosition.y + DRAGGINGWINDOW->m_vSize.y, PMONITOR->vecPosition.y + PMONITOR->vecSize.y); + const bool DISPLAYLEFT = STICKS(DRAGGINGWINDOW->m_vPosition.x, PMONITOR->vecPosition.x + PMONITOR->vecReservedTopLeft.x); + const bool DISPLAYRIGHT = STICKS(DRAGGINGWINDOW->m_vPosition.x + DRAGGINGWINDOW->m_vSize.x, PMONITOR->vecPosition.x + PMONITOR->vecSize.x - PMONITOR->vecReservedBottomRight.x); + const bool DISPLAYTOP = STICKS(DRAGGINGWINDOW->m_vPosition.y, PMONITOR->vecPosition.y + PMONITOR->vecReservedTopLeft.y); + const bool DISPLAYBOTTOM = STICKS(DRAGGINGWINDOW->m_vPosition.y + DRAGGINGWINDOW->m_vSize.y, PMONITOR->vecPosition.y + PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y); // construct allowed movement Vector2D allowedMovement = TICKDELTA; @@ -578,10 +571,7 @@ void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) { } } - if (!pWindow->m_bX11DoesntWantBorders) { - pWindow->m_vRealPosition.setValue(pWindow->m_vRealPosition.goalv() + pWindow->m_vRealSize.goalv() / 2.f); - pWindow->m_vRealSize.setValue(Vector2D(5, 5)); - } else { + if (pWindow->m_bX11DoesntWantBorders) { pWindow->m_vRealPosition.setValue(pWindow->m_vRealPosition.goalv()); pWindow->m_vRealSize.setValue(pWindow->m_vRealSize.goalv()); } |
