Forward port rev 1169040: Add sanity check to DesktopGrid in case of pager layout and only one desktop.
Pager reported two rows, which does not make sense and caused the grid to be in an inconsistent state. CCBUG: 248817 svn path=/trunk/KDE/kdebase/workspace/; revision=1169041
This commit is contained in:
parent
94bfeb3cfa
commit
47fce840b0
1 changed files with 5 additions and 0 deletions
|
@ -1250,6 +1250,11 @@ void DesktopGridEffect::setupGrid()
|
|||
case LayoutPager:
|
||||
orientation = Qt::Horizontal;
|
||||
gridSize = effects->desktopGridSize();
|
||||
// sanity check: pager may report incorrect size in case of one desktop
|
||||
if( numDesktops == 1 )
|
||||
{
|
||||
gridSize = QSize( 1, 1 );
|
||||
}
|
||||
break;
|
||||
case LayoutAutomatic:
|
||||
y = sqrt( float( numDesktops ) ) + 0.5;
|
||||
|
|
Loading…
Reference in a new issue