diff --git a/autotests/test_virtual_desktops.cpp b/autotests/test_virtual_desktops.cpp index ad70d4e759..277a0c853f 100644 --- a/autotests/test_virtual_desktops.cpp +++ b/autotests/test_virtual_desktops.cpp @@ -496,7 +496,7 @@ void TestVirtualDesktops::updateLayout_data() QTest::addColumn("desktop"); QTest::addColumn("result"); - QTest::newRow("01") << (uint)1 << QSize(1, 2); + QTest::newRow("01") << (uint)1 << QSize(1, 1); QTest::newRow("02") << (uint)2 << QSize(1, 2); QTest::newRow("03") << (uint)3 << QSize(2, 2); QTest::newRow("04") << (uint)4 << QSize(2, 2); diff --git a/virtualdesktops.cpp b/virtualdesktops.cpp index 7055c0fb4e..36ae63a6b6 100644 --- a/virtualdesktops.cpp +++ b/virtualdesktops.cpp @@ -305,7 +305,7 @@ void VirtualDesktopManager::updateLayout() } if (width == 0 && height == 0) { // Not given, set default layout - height = 2; + height = count() == 1u ? 1 : 2; } setNETDesktopLayout(orientation, width, height, 0 //rootInfo->desktopLayoutCorner() // Not really worth implementing right now.