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.
This commit is contained in:
parent
2d19afd3fc
commit
1416ff0994
2 changed files with 2 additions and 2 deletions
|
@ -496,7 +496,7 @@ void TestVirtualDesktops::updateLayout_data()
|
||||||
QTest::addColumn<uint>("desktop");
|
QTest::addColumn<uint>("desktop");
|
||||||
QTest::addColumn<QSize>("result");
|
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("02") << (uint)2 << QSize(1, 2);
|
||||||
QTest::newRow("03") << (uint)3 << QSize(2, 2);
|
QTest::newRow("03") << (uint)3 << QSize(2, 2);
|
||||||
QTest::newRow("04") << (uint)4 << QSize(2, 2);
|
QTest::newRow("04") << (uint)4 << QSize(2, 2);
|
||||||
|
|
|
@ -305,7 +305,7 @@ void VirtualDesktopManager::updateLayout()
|
||||||
}
|
}
|
||||||
if (width == 0 && height == 0) {
|
if (width == 0 && height == 0) {
|
||||||
// Not given, set default layout
|
// Not given, set default layout
|
||||||
height = 2;
|
height = count() == 1u ? 1 : 2;
|
||||||
}
|
}
|
||||||
setNETDesktopLayout(orientation,
|
setNETDesktopLayout(orientation,
|
||||||
width, height, 0 //rootInfo->desktopLayoutCorner() // Not really worth implementing right now.
|
width, height, 0 //rootInfo->desktopLayoutCorner() // Not really worth implementing right now.
|
||||||
|
|
Loading…
Reference in a new issue