diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c index 561dcba6..73b627ec 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -18,8 +18,12 @@ | |||
18 | #define ASSERT_NONNULL(PTR) \ | 18 | #define ASSERT_NONNULL(PTR) \ |
19 | sway_assert (PTR, #PTR "must be non-null") | 19 | sway_assert (PTR, #PTR "must be non-null") |
20 | 20 | ||
21 | |||
21 | static swayc_t *new_swayc(enum swayc_types type) { | 22 | static swayc_t *new_swayc(enum swayc_types type) { |
23 | // next id starts at 1 because 0 is assigned to root_container in layout.c | ||
24 | static size_t next_id = 1; | ||
22 | swayc_t *c = calloc(1, sizeof(swayc_t)); | 25 | swayc_t *c = calloc(1, sizeof(swayc_t)); |
26 | c->id = next_id++; | ||
23 | c->handle = -1; | 27 | c->handle = -1; |
24 | c->gaps = -1; | 28 | c->gaps = -1; |
25 | c->layout = L_NONE; | 29 | c->layout = L_NONE; |