Animation cycles only one time over the stack to go to the next selected window, even if <alt> and <tab> are pressed more often. Fixes odd behaviour if <alt> and <tab> are holded.
svn path=/trunk/KDE/kdebase/workspace/; revision=770090
This commit is contained in:
parent
dde6b49658
commit
673aa39462
1 changed files with 5 additions and 2 deletions
|
@ -449,12 +449,13 @@ void FlipSwitchEffect::tabBoxUpdated()
|
|||
// determine the switch direction
|
||||
int index = effects->currentTabBoxWindowList().indexOf(effects->currentTabBoxWindow());
|
||||
bool direction = false;
|
||||
int windowCount = effects->currentTabBoxWindowList().count();
|
||||
if( index > selectedWindow )
|
||||
{
|
||||
if( index == effects->currentTabBoxWindowList().count()-1 && selectedWindow == 0 ) forward = false;
|
||||
if( index == windowCount-1 && selectedWindow == 0 ) forward = false;
|
||||
else direction = true;
|
||||
}
|
||||
else if( index == 0 && ( selectedWindow == effects->currentTabBoxWindowList().count()-1 ) )
|
||||
else if( index == 0 && ( selectedWindow == windowCount-1 ) )
|
||||
{
|
||||
direction = true;
|
||||
}
|
||||
|
@ -474,6 +475,8 @@ void FlipSwitchEffect::tabBoxUpdated()
|
|||
{
|
||||
if( direction ) rearrangeWindows--;
|
||||
else rearrangeWindows++;
|
||||
if( rearrangeWindows >= windowCount ) rearrangeWindows = rearrangeWindows % windowCount;
|
||||
else if( (-1*rearrangeWindows) >= windowCount ) rearrangeWindows = -1*((-1*rearrangeWindows) % windowCount);
|
||||
}
|
||||
}
|
||||
effects->addRepaintFull();
|
||||
|
|
Loading…
Reference in a new issue