]> git.sur5r.net Git - i3/i3/commitdiff
Use con_has_parent in con_fullscreen_permits_focusing
authorOrestis Floros <orestisf1993@gmail.com>
Mon, 18 Sep 2017 10:22:01 +0000 (13:22 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Mon, 11 Dec 2017 12:00:14 +0000 (14:00 +0200)
src/con.c

index 1de91d00861c3e11736f6b2682914c70b5c83407..c9e2b6cfa076f819e2d32e31a474d4927625f103 100644 (file)
--- a/src/con.c
+++ b/src/con.c
@@ -2070,14 +2070,7 @@ bool con_fullscreen_permits_focusing(Con *con) {
 
     /* Allow it only if the container to be focused is contained within the
      * current fullscreen container. */
-    do {
-        if (con->parent == fs)
-            return true;
-        con = con->parent;
-    } while (con);
-
-    /* Focusing con would hide it behind a fullscreen window, disallow it. */
-    return false;
+    return con_has_parent(con, fs);
 }
 
 /*