Always update focus and history when inserting

This commit is contained in:
Bastien Dejean 2013-05-29 15:24:48 +02:00
parent 6dfff24ce8
commit 687c9962f1

4
tree.c
View file

@ -429,7 +429,7 @@ void insert_node(monitor_t *m, desktop_t *d, node_t *n)
node_t *focus = d->focus; node_t *focus = d->focus;
if (focus == NULL) { if (focus == NULL) {
d->root = d->focus = n; d->root = n;
} else { } else {
node_t *dad = make_node(); node_t *dad = make_node();
node_t *fopar = focus->parent; node_t *fopar = focus->parent;
@ -515,6 +515,8 @@ void insert_node(monitor_t *m, desktop_t *d, node_t *n)
if (focus->vacant) if (focus->vacant)
update_vacant_state(fopar); update_vacant_state(fopar);
} }
d->focus = n;
history_add(d->history, n);
put_status(); put_status();
} }