From 6b8bf10941ec83ac7a6e364b9c34f8c6f74d814a Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 28 Jan 2019 19:06:42 +1000 Subject: Introduce container_is_scratchpad_hidden Just a convenience function that improves readability of the code. Other things worth noting: * container_get_siblings and container_sibling_index no longer use the const keyword * container_handle_fullscreen_reparent is only ever called after attaching the container to a workspace, so its con->workspace check has been changed to an assertion --- sway/desktop/render.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sway/desktop/render.c') diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 9102dc34..92e623ef 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -986,8 +986,7 @@ void output_render(struct sway_output *output, struct timespec *when, } struct sway_container *fullscreen_con = root->fullscreen_global; - if (fullscreen_con && fullscreen_con->scratchpad && - !fullscreen_con->workspace) { + if (fullscreen_con && container_is_scratchpad_hidden(fullscreen_con)) { fullscreen_con = NULL; } if (!fullscreen_con) { -- cgit v1.2.3-54-g00ecf