diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 22:04:35 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-22 22:04:35 +0100 |
| commit | 53388ad8a45a87512044c14b332421aae6120262 (patch) | |
| tree | 9dc3bbf199e64925a477c62d5dd1aff35a1b048a /src/layout/DwindleLayout.cpp | |
| parent | e6fcbf576cd9d8f7498f80b6fe5812fbeee07f0b (diff) | |
dwindle: fix openingon, kind of
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 12 |
1 files 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(); |
