aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c1
-rw-r--r--wayland.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/main.c b/main.c
index 90f9ef2a..c1043171 100644
--- a/main.c
+++ b/main.c
@@ -887,6 +887,7 @@ main(int argc, char *const *argv)
term.cell_height = (int)ceil(term.fextents.height);
LOG_INFO("cell width=%d, height=%d", term.cell_width, term.cell_height);
+ term.wl.term = &term;
term.wl.display = wl_display_connect(NULL);
if (term.wl.display == NULL) {
LOG_ERR("failed to connect to wayland; no compositor running?");
diff --git a/wayland.h b/wayland.h
index 643d5ac5..43c4179f 100644
--- a/wayland.h
+++ b/wayland.h
@@ -87,6 +87,7 @@ struct wl_window {
tll(const struct monitor *) on_outputs; /* Outputs we're mapped on */
};
+struct terminal;
struct wayland {
struct wl_display *display;
struct wl_registry *registry;
@@ -124,6 +125,9 @@ struct wayland {
bool have_argb8888;
tll(struct monitor) monitors; /* All available outputs */
+
+ /* TODO: turn into a list to support multiple windows */
+ struct terminal *term;
};
/* TODO: return allocated pointer */