diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 938803a3..7a706489 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -511,5 +511,5 @@ bool CWorkspace::inert() { } IHyprLayout* CWorkspace::getCurrentLayout() { - return g_pLayoutManager->getCurrentLayout(); + return g_pLayoutManager->getCurrentGlobalLayout(); } diff --git a/src/managers/LayoutManager.cpp b/src/managers/LayoutManager.cpp index 70c2d2a3..5e85f7f3 100644 --- a/src/managers/LayoutManager.cpp +++ b/src/managers/LayoutManager.cpp @@ -5,7 +5,7 @@ CLayoutManager::CLayoutManager() { m_vLayouts.emplace_back(std::make_pair<>("master", &m_cMasterLayout)); } -IHyprLayout* CLayoutManager::getCurrentLayout() { +IHyprLayout* CLayoutManager::getCurrentGlobalLayout() { return m_vLayouts[m_iCurrentLayoutID].second; } @@ -15,9 +15,9 @@ void CLayoutManager::switchToLayout(std::string layout) { if (i == (size_t)m_iCurrentLayoutID) return; - getCurrentLayout()->onDisable(); + getCurrentGlobalLayout()->onDisable(); m_iCurrentLayoutID = i; - getCurrentLayout()->onEnable(); + getCurrentGlobalLayout()->onEnable(); return; } } diff --git a/src/managers/LayoutManager.hpp b/src/managers/LayoutManager.hpp index 78d86797..7a8f0c03 100644 --- a/src/managers/LayoutManager.hpp +++ b/src/managers/LayoutManager.hpp @@ -7,7 +7,7 @@ class CLayoutManager { public: CLayoutManager(); - IHyprLayout* getCurrentLayout(); + IHyprLayout* getCurrentGlobalLayout(); void switchToLayout(std::string);