]> git.lizzy.rs Git - bspwm.git/commitdiff
Don't set a wrong border color when `*_held_focus`
authorBastien Dejean <nihilhill@gmail.com>
Fri, 14 Aug 2020 10:06:15 +0000 (12:06 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Fri, 14 Aug 2020 10:06:15 +0000 (12:06 +0200)
src/tree.c

index 7481ccae7c660d3499a15ef21e31c62d98b3a847..a62fa264dca4f1d83a4241c23f5f16fff852658a 100644 (file)
@@ -1569,8 +1569,12 @@ bool swap_nodes(monitor_t *m1, desktop_t *d1, node_t *n1, monitor_t *m2, desktop
                        draw_border(n1, is_descendant(n1, d2->focus), (m2 == mon));
                }
        } else {
-               draw_border(n1, is_descendant(n1, d2->focus), (m2 == mon));
-               draw_border(n2, is_descendant(n2, d1->focus), (m1 == mon));
+               if (!n1_held_focus) {
+                       draw_border(n1, is_descendant(n1, d2->focus), (m2 == mon));
+               }
+               if (!n2_held_focus) {
+                       draw_border(n2, is_descendant(n2, d1->focus), (m1 == mon));
+               }
        }
 
        arrange(m1, d1);