From 9f02ea9b3a1c3dd9e5c02bdb82f43f0fb51e449e Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Tue, 28 Jul 2009 02:22:32 +0000 Subject: [PATCH] Correctly reference closed windows in the snap helper effect. BUG: 201696 svn path=/trunk/KDE/kdebase/workspace/; revision=1003327 --- effects/snaphelper/snaphelper.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/effects/snaphelper/snaphelper.cpp b/effects/snaphelper/snaphelper.cpp index 733dcde0d3..a4857e5e38 100644 --- a/effects/snaphelper/snaphelper.cpp +++ b/effects/snaphelper/snaphelper.cpp @@ -163,13 +163,20 @@ void SnapHelperEffect::postPaintScreen() }*/ } else if( m_window ) + { + if( m_window->isDeleted() ) + m_window->unrefWindow(); m_window = NULL; + } } void SnapHelperEffect::windowClosed( EffectWindow* w ) { if( m_window == w ) + { + m_window->refWindow(); m_active = false; + } } void SnapHelperEffect::windowUserMovedResized( EffectWindow* w, bool first, bool last )