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:
parent
89de694724
commit
a2ab7ee612
|
@ -205,8 +205,8 @@ static void context_attach_window(Context *c, Window *w) {
|
||||||
if (w->in_unused) {
|
if (w->in_unused) {
|
||||||
/* Used again? */
|
/* Used again? */
|
||||||
LIST_REMOVE(Window, unused, c->cache->unused, w);
|
LIST_REMOVE(Window, unused, c->cache->unused, w);
|
||||||
if (!c->cache->last_unused)
|
if (c->cache->last_unused == w)
|
||||||
c->cache->last_unused = w;
|
c->cache->last_unused = w->unused_prev;
|
||||||
|
|
||||||
w->in_unused = false;
|
w->in_unused = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue