From df437aa87e39abeded78aa3671df8720b9ca2741 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Mon, 18 Sep 2017 13:22:01 +0300 Subject: [PATCH] Use con_has_parent in con_fullscreen_permits_focusing --- src/con.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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); } /* -- 2.39.5