Only activate windows in desktop grid if the user moves them and prevent

moving of minimized windows. Also fixes activating of minimized windows
in desktop grid by clicking where they were when they were visible.
BUG: 179938

svn path=/trunk/KDE/kdebase/workspace/; revision=924118
This commit is contained in:
Lucas Murray 2009-02-10 07:02:19 +00:00
parent 5945dd1131
commit c493623f7a

View file

@ -347,7 +347,8 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
}
if( windowMove )
{
effects->activateWindow( windowMove ); // Just in case it was deactivated
if( wasWindowMove )
effects->activateWindow( windowMove ); // Just in case it was deactivated
effects->setElevatedWindow( windowMove, false );
windowMove = NULL;
}
@ -550,7 +551,7 @@ EffectWindow* DesktopGridEffect::windowAt( QPoint pos ) const
int desktop;
pos = unscalePos( pos, &desktop );
foreach( EffectWindow* w, windows )
if( w->isOnDesktop( desktop ) && w->geometry().contains( pos ))
if( w->isOnDesktop( desktop ) && !w->isMinimized() && w->geometry().contains( pos ))
return w;
return NULL;
}