diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-03 23:06:01 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-04 14:01:20 +1000 |
commit | 04489ff4209dc073027419d90961367cfb998fe8 (patch) | |
tree | d6f6213d2374e10a875e8ced872511e6e656ae3e /sway/commands/move.c | |
parent | Merge pull request #2419 from RedSoxFan/fix-2416 (diff) | |
download | sway-04489ff4209dc073027419d90961367cfb998fe8.tar.gz sway-04489ff4209dc073027419d90961367cfb998fe8.tar.zst sway-04489ff4209dc073027419d90961367cfb998fe8.zip |
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
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r-- | sway/commands/move.c | 5 |
1 files changed, 2 insertions, 3 deletions
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 @@ | |||
9 | #include "sway/input/cursor.h" | 9 | #include "sway/input/cursor.h" |
10 | #include "sway/input/seat.h" | 10 | #include "sway/input/seat.h" |
11 | #include "sway/output.h" | 11 | #include "sway/output.h" |
12 | #include "sway/scratchpad.h" | ||
13 | #include "sway/tree/arrange.h" | 12 | #include "sway/tree/arrange.h" |
14 | #include "sway/tree/container.h" | 13 | #include "sway/tree/container.h" |
15 | #include "sway/tree/layout.h" | 14 | #include "sway/tree/root.h" |
16 | #include "sway/tree/workspace.h" | 15 | #include "sway/tree/workspace.h" |
17 | #include "stringop.h" | 16 | #include "stringop.h" |
18 | #include "list.h" | 17 | #include "list.h" |
@@ -324,7 +323,7 @@ static struct cmd_results *move_to_scratchpad(struct sway_container *con) { | |||
324 | return cmd_results_new(CMD_INVALID, "move", | 323 | return cmd_results_new(CMD_INVALID, "move", |
325 | "Container is already in the scratchpad"); | 324 | "Container is already in the scratchpad"); |
326 | } | 325 | } |
327 | scratchpad_add_container(con); | 326 | root_scratchpad_add_container(con); |
328 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 327 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
329 | } | 328 | } |
330 | 329 | ||