]> git.sur5r.net Git - i3/i3/commitdiff
Remove useless check in _tree_next
authorOrestis Floros <orestisf1993@gmail.com>
Sat, 9 Dec 2017 14:25:30 +0000 (16:25 +0200)
committerOrestis Floros <orestisf1993@gmail.com>
Sat, 9 Dec 2017 14:39:33 +0000 (16:39 +0200)
con_descend_focused on an empty workspace should return the workspace.

src/tree.c

index 710bb655f6ab39254f0187884d69f565e718f9be..f87c4326e4c0fa3c94484ae785935add6308f545 100644 (file)
@@ -565,10 +565,8 @@ static bool _tree_next(Con *con, char way, orientation_t orientation, bool wrap)
             focus = con_descend_focused(workspace);
         }
 
-        if (focus) {
-            con_focus(focus);
-            x_set_warp_to(&(focus->rect));
-        }
+        con_focus(focus);
+        x_set_warp_to(&(focus->rect));
         return true;
     }