Position fixes.
svn path=/branches/work/kwin_composite/; revision=651101
This commit is contained in:
parent
c38dc5e099
commit
76eae77b57
1 changed files with 8 additions and 7 deletions
|
@ -105,7 +105,7 @@ void DesktopChangeSlideEffect::paintScreen( int mask, QRegion region, ScreenPain
|
||||||
{
|
{
|
||||||
painting_desktop = desktop;
|
painting_desktop = desktop;
|
||||||
painting_sticky = do_sticky;
|
painting_sticky = do_sticky;
|
||||||
painting_diff = QPoint( currentPos - desktopRect.topLeft());
|
painting_diff = desktopRect.topLeft() - currentPos;
|
||||||
if( options->rollOverDesktops )
|
if( options->rollOverDesktops )
|
||||||
{
|
{
|
||||||
if( painting_diff.x() > displayWidth())
|
if( painting_diff.x() > displayWidth())
|
||||||
|
@ -119,8 +119,8 @@ void DesktopChangeSlideEffect::paintScreen( int mask, QRegion region, ScreenPain
|
||||||
}
|
}
|
||||||
do_sticky = false; // paint on-all-desktop windows only once
|
do_sticky = false; // paint on-all-desktop windows only once
|
||||||
ScreenPaintData d = data;
|
ScreenPaintData d = data;
|
||||||
d.xTranslate -= painting_diff.x();
|
d.xTranslate += painting_diff.x();
|
||||||
d.yTranslate -= painting_diff.y();
|
d.yTranslate += painting_diff.y();
|
||||||
// TODO mask parts that are not visible?
|
// TODO mask parts that are not visible?
|
||||||
effects->paintScreen( mask, region, d );
|
effects->paintScreen( mask, region, d );
|
||||||
}
|
}
|
||||||
|
@ -133,8 +133,8 @@ void DesktopChangeSlideEffect::paintWindow( EffectWindow* w, int mask, QRegion r
|
||||||
{ // don't move windows on all desktops (compensate screen transformation)
|
{ // don't move windows on all desktops (compensate screen transformation)
|
||||||
if( w->isOnAllDesktops()) // TODO also fix 'Workspace::movingClient'
|
if( w->isOnAllDesktops()) // TODO also fix 'Workspace::movingClient'
|
||||||
{
|
{
|
||||||
data.xTranslate += painting_diff.x();
|
data.xTranslate -= painting_diff.x();
|
||||||
data.yTranslate += painting_diff.y();
|
data.yTranslate -= painting_diff.y();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
effects->paintWindow( w, mask, region, data );
|
effects->paintWindow( w, mask, region, data );
|
||||||
|
@ -204,8 +204,9 @@ void DesktopChangeSlideEffect::desktopChanged( int old )
|
||||||
}
|
}
|
||||||
else // current position is not on current desktop, do full progress
|
else // current position is not on current desktop, do full progress
|
||||||
progress = 0;
|
progress = 0;
|
||||||
diffPos = ( currentPos - desktopRect.topLeft());
|
diffPos = desktopRect.topLeft() - currentPos;
|
||||||
startPos = desktopRect.topLeft() + diffPos / ( MAX_PROGRESS - progress ) * MAX_PROGRESS;
|
// Compute starting point for this new move (given current and end positions)
|
||||||
|
startPos = desktopRect.topLeft() - diffPos * MAX_PROGRESS / ( MAX_PROGRESS - progress );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue