Fix focus history as soon as possible

Fixes #509.
This commit is contained in:
Bastien Dejean 2016-06-26 16:58:52 +02:00
parent 8587bcd599
commit c157d644ba

View file

@ -167,6 +167,7 @@ bool transfer_desktop(monitor_t *ms, monitor_t *md, desktop_t *d)
}
insert_desktop(md, d);
history_transfer_desktop(md, d);
if (was_active) {
if (mon == ms) {
@ -182,11 +183,9 @@ bool transfer_desktop(monitor_t *ms, monitor_t *md, desktop_t *d)
sticky_still = true;
}
history_transfer_desktop(md, d);
adapt_geometry(&ms->rectangle, &md->rectangle, d->root);
arrange(md, d);
if (md->desk == d) {
if (mon == md) {
focus_node(md, d, d->focus);