Fixed bug where some windows were not raised when they were moved.

Fixed possible bug when the moving window is deleted.

svn path=/trunk/KDE/kdebase/workspace/; revision=886399
This commit is contained in:
Lucas Murray 2008-11-19 07:46:01 +00:00
parent f11107c987
commit 3a57e33bf6

View file

@ -312,6 +312,7 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
{ // Prepare it for moving
windowMoveDiff = w->pos() - unscalePos( me->pos(), NULL );
windowMove = w;
effects->setElevatedWindow( windowMove, true );
}
}
else if(( me->buttons() == Qt::MidButton || me->buttons() == Qt::RightButton ) && windowMove == NULL )
@ -329,14 +330,17 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
}
if( e->type() == QEvent::MouseButtonRelease && me->button() == Qt::LeftButton )
{
if( wasWindowMove )
effects->activateWindow( windowMove ); // Just in case it was deactivated
else
if( !wasWindowMove )
{
setCurrentDesktop( highlightedDesktop );
setActive( false );
}
windowMove = NULL;
if( windowMove )
{
effects->activateWindow( windowMove ); // Just in case it was deactivated
effects->setElevatedWindow( windowMove, false );
windowMove = NULL;
}
wasWindowMove = false;
}
}