rename CLayoutManager::getCurrentLayout to getCurrentGlobalLayout to break old api

This commit is contained in:
UjinT34 2024-06-16 16:56:11 +03:00
parent 37f2bbac07
commit 1893f18504
3 changed files with 5 additions and 5 deletions

View file

@ -511,5 +511,5 @@ bool CWorkspace::inert() {
} }
IHyprLayout* CWorkspace::getCurrentLayout() { IHyprLayout* CWorkspace::getCurrentLayout() {
return g_pLayoutManager->getCurrentLayout(); return g_pLayoutManager->getCurrentGlobalLayout();
} }

View file

@ -5,7 +5,7 @@ CLayoutManager::CLayoutManager() {
m_vLayouts.emplace_back(std::make_pair<>("master", &m_cMasterLayout)); m_vLayouts.emplace_back(std::make_pair<>("master", &m_cMasterLayout));
} }
IHyprLayout* CLayoutManager::getCurrentLayout() { IHyprLayout* CLayoutManager::getCurrentGlobalLayout() {
return m_vLayouts[m_iCurrentLayoutID].second; return m_vLayouts[m_iCurrentLayoutID].second;
} }
@ -15,9 +15,9 @@ void CLayoutManager::switchToLayout(std::string layout) {
if (i == (size_t)m_iCurrentLayoutID) if (i == (size_t)m_iCurrentLayoutID)
return; return;
getCurrentLayout()->onDisable(); getCurrentGlobalLayout()->onDisable();
m_iCurrentLayoutID = i; m_iCurrentLayoutID = i;
getCurrentLayout()->onEnable(); getCurrentGlobalLayout()->onEnable();
return; return;
} }
} }

View file

@ -7,7 +7,7 @@ class CLayoutManager {
public: public:
CLayoutManager(); CLayoutManager();
IHyprLayout* getCurrentLayout(); IHyprLayout* getCurrentGlobalLayout();
void switchToLayout(std::string); void switchToLayout(std::string);