From 51ce3ddd670ca9fb7d359ec8be617354c23ba072 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:06:01 +0000 Subject: [PATCH] layoutmgr: don't reenable layout on unchanged layout --- src/managers/LayoutManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/managers/LayoutManager.cpp b/src/managers/LayoutManager.cpp index c219c25b..12b3633e 100644 --- a/src/managers/LayoutManager.cpp +++ b/src/managers/LayoutManager.cpp @@ -12,6 +12,9 @@ IHyprLayout* CLayoutManager::getCurrentLayout() { void CLayoutManager::switchToLayout(std::string layout) { for (size_t i = 0; i < m_vLayouts.size(); ++i) { if (m_vLayouts[i].first == layout) { + if (i == m_iCurrentLayoutID) + return; + getCurrentLayout()->onDisable(); m_iCurrentLayoutID = i; getCurrentLayout()->onEnable();