Fix VirtualDesktopGrid::size for one desktop

The default was set that the grid size for one desktop is (1, 2)
which doesn't make any sense at all - it should be (1, 1).

This most likely only affects the unit test as in production the
default layout is taken fron NETRootInfo.
icc-effect-5.14.5 v5.0.95
Martin Gräßlin 2014-09-25 12:49:18 +02:00
parent 2d19afd3fc
commit 1416ff0994
2 changed files with 2 additions and 2 deletions

View File

@ -496,7 +496,7 @@ void TestVirtualDesktops::updateLayout_data()
QTest::addColumn<uint>("desktop");
QTest::addColumn<QSize>("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);

View File

@ -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.