From 1893f185044e296b62b176ac7843a047cc7e9372 Mon Sep 17 00:00:00 2001 From: UjinT34 Date: Sun, 16 Jun 2024 16:56:11 +0300 Subject: [PATCH] rename CLayoutManager::getCurrentLayout to getCurrentGlobalLayout to break old api --- src/desktop/Workspace.cpp | 2 +- src/managers/LayoutManager.cpp | 6 +++--- src/managers/LayoutManager.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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);