dwindle: fix openingon, kind of

This commit is contained in:
vaxerski 2022-03-22 22:04:35 +01:00
parent e6fcbf576c
commit 53388ad8a4

View file

@ -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;
@ -138,12 +140,6 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) {
}
// 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();