From 53388ad8a45a87512044c14b332421aae6120262 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 22 Mar 2022 22:04:35 +0100 Subject: [PATCH] dwindle: fix openingon, kind of --- src/layout/DwindleLayout.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 904c3f31..b03f0ffd 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -127,8 +127,10 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) { PNODE->isNode = false; PNODE->layout = this; + SDwindleNodeData* OPENINGON = getNodeFromWindow(g_pCompositor->vectorToWindowTiled(g_pInputManager->getMouseCoordsInternal())); + // if it's the first, it's easy. Make it fullscreen. - if (getNodesOnWorkspace(PNODE->workspaceID) == 1) { + if (!OPENINGON) { PNODE->position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft; PNODE->size = PMONITOR->vecSize - PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight; @@ -136,14 +138,8 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) { return; } - + // If it's not, get the node under our cursor - SDwindleNodeData* OPENINGON = getNodeFromWindow(g_pCompositor->vectorToWindowTiled(g_pInputManager->getMouseCoordsInternal())); - - if (!OPENINGON) { - Debug::log(ERR, "OPENINGON null?????"); - return; - } m_lDwindleNodesData.push_back(SDwindleNodeData()); const auto NEWPARENT = &m_lDwindleNodesData.back();