From 6a94ff56412c983c497e0ab8a3ecbf8de4d42aab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 1 Nov 2011 06:48:21 +0100 Subject: [PATCH] Don't handle closing windows while BoxSwitch is inactive This might be the cause for ghost windows, because they got referrenced without being unreferrenced again. CCBUG: 259640 --- effects/boxswitch/boxswitch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/effects/boxswitch/boxswitch.cpp b/effects/boxswitch/boxswitch.cpp index d69c4201ca..4b6b41c37a 100644 --- a/effects/boxswitch/boxswitch.cpp +++ b/effects/boxswitch/boxswitch.cpp @@ -487,6 +487,9 @@ void BoxSwitchEffect::setSelectedWindow(EffectWindow* w) void BoxSwitchEffect::slotWindowClosed(EffectWindow* w) { + if (!mActivated) { + return; + } if (w == selected_window) { setSelectedWindow(0); }