From: Orestis Floros Date: Mon, 18 Sep 2017 10:22:01 +0000 (+0300) Subject: Use con_has_parent in con_fullscreen_permits_focusing X-Git-Tag: 4.15~26^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df437aa87e39abeded78aa3671df8720b9ca2741;p=i3%2Fi3 Use con_has_parent in con_fullscreen_permits_focusing --- diff --git a/src/con.c b/src/con.c index 1de91d00..c9e2b6cf 100644 --- 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); } /*