aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-19 18:11:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-11-22 18:29:43 +0000
commit4cd1d35c1e397d20be73ff2d73c4718be3b27881 (patch)
treed2cecc9876750f223e4c3d0dc98de5f2c56ea572
parentscripts: generate-alt-random-writes: add unicode and multi-column chars (diff)
pgo: initialize a dummy wayland backend
* Empty seat list * Empty monitor list * Add dummy terminal instance to terminal list
-rw-r--r--pgo/pgo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/pgo/pgo.c b/pgo/pgo.c
index ce1570d1..fe22a98d 100644
--- a/pgo/pgo.c
+++ b/pgo/pgo.c
@@ -137,7 +137,14 @@ main(int argc, const char *const *argv)
rows[i]->cells = calloc(col_count, sizeof(rows[i]->cells[0]));
}
+ struct wayland wayl = {
+ .seats = tll_init(),
+ .monitors = tll_init(),
+ .terms = tll_init(),
+ };
+
struct terminal term = {
+ .wl = &wayl,
.grid = &term.normal,
.normal = {
.num_rows = grid_row_count,
@@ -164,6 +171,8 @@ main(int argc, const char *const *argv)
},
};
+ tll_push_back(wayl.terms, &term);
+
int ret = EXIT_FAILURE;
for (int i = 1; i < argc; i++) {
@@ -205,6 +214,8 @@ main(int argc, const char *const *argv)
ret = EXIT_SUCCESS;
out:
+ tll_free(wayl.terms);
+
for (int i = 0; i < grid_row_count; i++) {
free(rows[i]->cells);
free(rows[i]);