summaryrefslogtreecommitdiff
path: root/src/staticswitcher.cpp
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-12-14 23:22:56 -0600
committerErkin Bahceci <erkinbah@gmail.com>2009-12-16 06:18:37 -0600
commitf43f9ad65c8f14060c8621a36b674a261434055d (patch)
tree4d48943a083366ccb47386420d888b964cd4a48f /src/staticswitcher.cpp
parenta3f1449496b132055afb55e381362ec53dfc522c (diff)
downloadstaticswitcher-f43f9ad65c8f14060c8621a36b674a261434055d.tar.gz
staticswitcher-f43f9ad65c8f14060c8621a36b674a261434055d.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 'src/staticswitcher.cpp')
-rw-r--r--src/staticswitcher.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/staticswitcher.cpp b/src/staticswitcher.cpp
index e31da81..12ccb46 100644
--- a/src/staticswitcher.cpp
+++ b/src/staticswitcher.cpp
@@ -814,8 +814,10 @@ StaticSwitchScreen::glPaintOutput (const GLScreenPaintAttrib &sAttrib,
if (mode == HighlightModeBringSelectedToFront)
{
+ CompWindow *frontWindow = ::screen->clientList ().back ();
+
zoomed = selectedWindow;
- if (zoomed)
+ if (zoomed && zoomed != frontWindow)
{
CompWindow *w;
@@ -824,8 +826,11 @@ StaticSwitchScreen::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