Honor pointer_follows_focus when swapping nodes

Closes #1170.
This commit is contained in:
Bastien Dejean 2020-08-14 12:15:21 +02:00
parent 3f12328f26
commit 446ff985e1

View file

@ -1581,6 +1581,10 @@ bool swap_nodes(monitor_t *m1, desktop_t *d1, node_t *n1, monitor_t *m2, desktop
if (d1 != d2) {
arrange(m2, d2);
} else {
if (pointer_follows_focus && (n1_held_focus || n2_held_focus)) {
center_pointer(get_rectangle(m1, d1, d1->focus));
}
}
return true;