mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 13:05:58 +01:00
layoutmgr: don't reenable layout on unchanged layout
This commit is contained in:
parent
64f35c0e31
commit
51ce3ddd67
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,9 @@ IHyprLayout* CLayoutManager::getCurrentLayout() {
|
||||||
void CLayoutManager::switchToLayout(std::string layout) {
|
void CLayoutManager::switchToLayout(std::string layout) {
|
||||||
for (size_t i = 0; i < m_vLayouts.size(); ++i) {
|
for (size_t i = 0; i < m_vLayouts.size(); ++i) {
|
||||||
if (m_vLayouts[i].first == layout) {
|
if (m_vLayouts[i].first == layout) {
|
||||||
|
if (i == m_iCurrentLayoutID)
|
||||||
|
return;
|
||||||
|
|
||||||
getCurrentLayout()->onDisable();
|
getCurrentLayout()->onDisable();
|
||||||
m_iCurrentLayoutID = i;
|
m_iCurrentLayoutID = i;
|
||||||
getCurrentLayout()->onEnable();
|
getCurrentLayout()->onEnable();
|
||||||
|
|
Loading…
Reference in a new issue