diff --git a/src/virtualdesktops.cpp b/src/virtualdesktops.cpp index 58c17621c5..10e5d00b1c 100644 --- a/src/virtualdesktops.cpp +++ b/src/virtualdesktops.cpp @@ -502,9 +502,9 @@ void VirtualDesktopManager::removeVirtualDesktop(VirtualDesktop *desktop) Q_EMIT currentChanged(oldCurrent, newCurrent); } + updateRootInfo(); save(); - updateRootInfo(); Q_EMIT desktopRemoved(desktop); Q_EMIT countChanged(m_desktops.count() + 1, m_desktops.count()); @@ -661,6 +661,13 @@ void VirtualDesktopManager::updateLayout() m_rows = count() == 1u ? 1 : 2; columns = count() / m_rows; } + + // Patch to make desktop grid size equal 1 when 1 desktop for desktop switching animations + if (m_desktops.size() == 1) { + m_rows = 1; + columns = 1; + } + setNETDesktopLayout(orientation, columns, m_rows, 0 // rootInfo->desktopLayoutCorner() // Not really worth implementing right now. );