From 1f639f2aba28a7a949a095f1fa2f323027ad4645 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 20 Mar 2022 18:31:58 +0100 Subject: dwindle fixes --- src/layout/DwindleLayout.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index c69e310f..57f2703f 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -137,23 +137,11 @@ void CHyprDwindleLayout::onWindowCreated(CWindow* pWindow) { return; } - // If it's not, get the last node. - const auto PLASTFOCUS = getNodeFromWindow(g_pCompositor->getWindowFromSurface(g_pCompositor->m_pLastFocus)); - SDwindleNodeData* OPENINGON = PLASTFOCUS; - if (PLASTFOCUS) { - if (PLASTFOCUS->workspaceID != PNODE->workspaceID) { - OPENINGON = getNodeFromWindow(g_pCompositor->vectorToWindow(g_pInputManager->getMouseCoordsInternal())); - } - } else { - OPENINGON = getNodeFromWindow(g_pCompositor->vectorToWindow(g_pInputManager->getMouseCoordsInternal())); - } - - if (!OPENINGON) { - OPENINGON = getFirstNodeOnWorkspace(PNODE->workspaceID); - } + // 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 still null?????"); + Debug::log(ERR, "OPENINGON null?????"); return; } -- cgit v1.2.3