summaryrefslogtreecommitdiff
path: root/plugins/switcher
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-12-14 23:23:26 -0600
committerErkin Bahceci <erkinbah@gmail.com>2009-12-16 06:09:57 -0600
commit6b9eb15b09fa68ad35b176ef2a9ad1d211b180dd (patch)
treeb043afd174a4f9d30b56ac9d599117d2278c7b6e /plugins/switcher
parente3ae79832d143ecbd159c427b87dbd758b671a02 (diff)
downloadcompiz-with-glib-mainloop-6b9eb15b09fa68ad35b176ef2a9ad1d211b180dd.tar.gz
compiz-with-glib-mainloop-6b9eb15b09fa68ad35b176ef2a9ad1d211b180dd.tar.bz2
Fix crash when first switching after a window is minimized.
In that case, the crash happened when the minimized window was highlighted in the switcher window.
Diffstat (limited to 'plugins/switcher')
-rw-r--r--plugins/switcher/src/switcher.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/switcher/src/switcher.cpp b/plugins/switcher/src/switcher.cpp
index 2fe9b22..3702fb1 100644
--- a/plugins/switcher/src/switcher.cpp
+++ b/plugins/switcher/src/switcher.cpp
@@ -734,8 +734,10 @@ SwitchScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
if (optionGetBringToFront ())
{
+ CompWindow *frontWindow = ::screen->clientList ().back ();
+
zoomed = zoomedWindow;
- if (zoomed && !zoomed->destroyed ())
+ if (zoomed && !zoomed->destroyed () && zoomed != frontWindow)
{
CompWindow *w;
@@ -744,8 +746,11 @@ SwitchScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
zoomedAbove = (w) ? w->id () : None;
screen->unhookWindow (zoomed);
- screen->insertWindow (zoomed,
- screen->clientList ().back ()->id ());
+ screen->insertWindow (zoomed, frontWindow->id ());
+ }
+ else
+ {
+ zoomed = NULL;
}
}
else