From 04489ff4209dc073027419d90961367cfb998fe8 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 3 Aug 2018 23:06:01 +1000 Subject: Separate root-related code This creates a root.c and moves bits and pieces from elsewhere into it. * layout_init has been renamed to root_create and moved into root.c * root_destroy has been created and is called on shutdown * scratchpad code has been moved into root.c, because hidden scratchpad containers are stored in the root struct --- sway/commands/move.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sway/commands/move.c') diff --git a/sway/commands/move.c b/sway/commands/move.c index 1e8b76f9..841da4c4 100644 --- a/sway/commands/move.c +++ b/sway/commands/move.c @@ -9,10 +9,9 @@ #include "sway/input/cursor.h" #include "sway/input/seat.h" #include "sway/output.h" -#include "sway/scratchpad.h" #include "sway/tree/arrange.h" #include "sway/tree/container.h" -#include "sway/tree/layout.h" +#include "sway/tree/root.h" #include "sway/tree/workspace.h" #include "stringop.h" #include "list.h" @@ -324,7 +323,7 @@ static struct cmd_results *move_to_scratchpad(struct sway_container *con) { return cmd_results_new(CMD_INVALID, "move", "Container is already in the scratchpad"); } - scratchpad_add_container(con); + root_scratchpad_add_container(con); return cmd_results_new(CMD_SUCCESS, NULL, NULL); } -- cgit v1.2.3