journal: Set the last_unused pointer correctly when attaching an unused window

It seems the previous code was copy/pasted from context_detach_window()
but not updated.
This commit is contained in:
Colin Guthrie 2012-10-16 12:03:37 +01:00 committed by Lennart Poettering
parent 89de694724
commit a2ab7ee612
1 changed files with 2 additions and 2 deletions

View File

@ -205,8 +205,8 @@ static void context_attach_window(Context *c, Window *w) {
if (w->in_unused) {
/* Used again? */
LIST_REMOVE(Window, unused, c->cache->unused, w);
if (!c->cache->last_unused)
c->cache->last_unused = w;
if (c->cache->last_unused == w)
c->cache->last_unused = w->unused_prev;
w->in_unused = false;
}