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/main.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/main.c')
-rw-r--r-- | sway/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/main.c b/sway/main.c index c02caf42..d433368b 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -407,7 +407,7 @@ int main(int argc, char **argv) { | |||
407 | 407 | ||
408 | wlr_log(WLR_INFO, "Starting sway version " SWAY_VERSION); | 408 | wlr_log(WLR_INFO, "Starting sway version " SWAY_VERSION); |
409 | 409 | ||
410 | layout_init(); | 410 | root_create(); |
411 | 411 | ||
412 | if (!server_init(&server)) { | 412 | if (!server_init(&server)) { |
413 | return 1; | 413 | return 1; |
@@ -464,6 +464,7 @@ int main(int argc, char **argv) { | |||
464 | wlr_log(WLR_INFO, "Shutting down sway"); | 464 | wlr_log(WLR_INFO, "Shutting down sway"); |
465 | 465 | ||
466 | server_fini(&server); | 466 | server_fini(&server); |
467 | root_destroy(); | ||
467 | 468 | ||
468 | if (config) { | 469 | if (config) { |
469 | free_config(config); | 470 | free_config(config); |