Some more multi screen voodoo. Thanks to kwin not crashing any more when changing layout and/or resolution I'm quite confident that the layout works with all possible two screen layouts.
svn path=/trunk/KDE/kdebase/workspace/; revision=893587
This commit is contained in:
parent
fae02ff9de
commit
010798db44
1 changed files with 5 additions and 2 deletions
|
@ -566,10 +566,13 @@ void CoverSwitchEffect::tabBoxAdded( int mode )
|
||||||
scaleFactor = (zPosition+1100) * 2.0 * tan( 60.0 * M_PI / 360.0f )/displayWidth();
|
scaleFactor = (zPosition+1100) * 2.0 * tan( 60.0 * M_PI / 360.0f )/displayWidth();
|
||||||
if( displayWidth()-area.width() != 0 )
|
if( displayWidth()-area.width() != 0 )
|
||||||
{
|
{
|
||||||
if( area.width() < displayWidth() * 0.5f )
|
// one of the screens is smaller than the other (horizontal)
|
||||||
|
if( area.width() < displayWidth() - area.width() )
|
||||||
scaleFactor *= (float)area.width()/(float)(displayWidth()-area.width());
|
scaleFactor *= (float)area.width()/(float)(displayWidth()-area.width());
|
||||||
else
|
else if( area.width() != displayWidth() - area.width() )
|
||||||
{
|
{
|
||||||
|
// vertical layout with different width
|
||||||
|
// but we don't want to catch screens with same width and different height
|
||||||
if( displayHeight() != area.height() )
|
if( displayHeight() != area.height() )
|
||||||
scaleFactor *= (float)area.width()/(float)(displayWidth());
|
scaleFactor *= (float)area.width()/(float)(displayWidth());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue