summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2010-04-13 17:49:09 +0200
committerDennis Kasprzyk <onestone@compiz-fusion.org>2010-04-13 17:49:09 +0200
commitdf69090097868b71188c0f201a863836e79df774 (patch)
tree843148fab14e3663c5b466de5030eb87783fc9a2
parenteb34f2a434e42da502e90461490d21ebc9f74aaf (diff)
downloadstackswitch-df69090097868b71188c0f201a863836e79df774.tar.gz
stackswitch-df69090097868b71188c0f201a863836e79df774.tar.bz2
Make Stackswitch compile.
-rw-r--r--src/stackswitch.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/stackswitch.cpp b/src/stackswitch.cpp
index 23bdc21..5333080 100644
--- a/src/stackswitch.cpp
+++ b/src/stackswitch.cpp
@@ -1184,7 +1184,7 @@ StackswitchScreen::windowRemove (Window id)
if (w)
{
bool inList = false;
- std::vector <CompWindow *>::iterator it;
+ CompWindowVector::iterator it = mWindows.begin();
Window selected;
STACKSWITCH_WINDOW (w);
@@ -1197,34 +1197,30 @@ StackswitchScreen::windowRemove (Window id)
selected = mSelectedWindow;
- while (it != mWindows.begin ())
+ while (it != mWindows.end ())
{
CompWindow *cw = *it;
- if (w && id == cw->id ())
+ if (id == cw->id ())
{
inList = true;
if (w->id () == selected)
{
- if (it < mWindows.end ()--)
- {
- it++;
- selected = cw->id ();
- it--;
- }
+ it++;
+ if (it != mWindows.end ())
+ selected = (*it)->id();
else
selected = mWindows.front ()->id ();
+ it--;
mSelectedWindow = selected;
}
- it--;
-
- mWindows.remove (cw); // ???
+ mWindows.erase (it);
break;
-
}
+ it++;
}
if (!inList)