From 3a57e33bf610e2c3b2faa1d997d9cbac2261c447 Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Wed, 19 Nov 2008 07:46:01 +0000 Subject: [PATCH] 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 --- effects/desktopgrid.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/effects/desktopgrid.cpp b/effects/desktopgrid.cpp index 38cc57ba2a..709f7bd52c 100644 --- a/effects/desktopgrid.cpp +++ b/effects/desktopgrid.cpp @@ -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; } }