mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
pgo: initialize a dummy wayland backend
* Empty seat list * Empty monitor list * Add dummy terminal instance to terminal list
This commit is contained in:
parent
96db338262
commit
4cd1d35c1e
1 changed files with 11 additions and 0 deletions
11
pgo/pgo.c
11
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]));
|
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 = {
|
struct terminal term = {
|
||||||
|
.wl = &wayl,
|
||||||
.grid = &term.normal,
|
.grid = &term.normal,
|
||||||
.normal = {
|
.normal = {
|
||||||
.num_rows = grid_row_count,
|
.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;
|
int ret = EXIT_FAILURE;
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
|
|
@ -205,6 +214,8 @@ main(int argc, const char *const *argv)
|
||||||
ret = EXIT_SUCCESS;
|
ret = EXIT_SUCCESS;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
tll_free(wayl.terms);
|
||||||
|
|
||||||
for (int i = 0; i < grid_row_count; i++) {
|
for (int i = 0; i < grid_row_count; i++) {
|
||||||
free(rows[i]->cells);
|
free(rows[i]->cells);
|
||||||
free(rows[i]);
|
free(rows[i]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue