Distance between 3D windows is determined by the zoom position divided by the number of windows in stacking order when cube is activated.

svn path=/trunk/KDE/kdebase/workspace/; revision=928279
This commit is contained in:
Martin Gräßlin 2009-02-19 11:03:40 +00:00
parent 6a671fa2f2
commit 5025509e3a
2 changed files with 4 additions and 1 deletions

View file

@ -86,6 +86,7 @@ CubeEffect::CubeEffect()
, useShaders( false )
, cylinderShader( 0 )
, sphereShader( 0 )
, zOrderingFactor( 0.0f )
, capListCreated( false )
, recompileList( true )
, glList( 0 )
@ -1410,7 +1411,7 @@ void CubeEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowP
// z-Ordering
if( !w->isDesktop() && !w->isDock() && useZOrdering )
{
float zOrdering = (effects->stackingOrder().indexOf( w )-1)*25.0;
float zOrdering = (effects->stackingOrder().indexOf( w )+1)*zOrderingFactor;
if( start )
zOrdering *= timeLine.value();
if( stop )
@ -1945,6 +1946,7 @@ void CubeEffect::setActive( bool active )
Qt::OpenHandCursor );
frontDesktop = effects->currentDesktop();
zoom = 0.0;
zOrderingFactor = zPosition / ( effects->stackingOrder().count() - 1 );
start = true;
effects->setActiveFullScreenEffect( this );
kDebug(1212) << "Cube is activated";

View file

@ -144,6 +144,7 @@ class CubeEffect
GLShader* sphereShader;
float capDeformationFactor;
bool useZOrdering;
float zOrderingFactor;
// GL lists
bool capListCreated;