From 11a4b6c8875cd818cc46e255682d307f2e77ddb5 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 11 Aug 2012 14:01:04 +0200 Subject: [PATCH] terminal: remove global video object We used to have a global video object for each terminal. However, this has all been moved to the UI subsystem which can deal with multiple video objects simultaneously. Hence, we can remove this as it is no longer used. Signed-off-by: David Herrmann --- src/terminal.c | 7 +------ src/terminal.h | 1 - src/ui.c | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 8da7925..39e397d 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -58,7 +58,6 @@ struct screen { struct kmscon_terminal { unsigned long ref; struct ev_eloop *eloop; - struct uterm_video *video; struct uterm_input *input; bool opened; @@ -319,13 +318,12 @@ static void write_event(struct kmscon_vte *vte, const char *u8, size_t len, int kmscon_terminal_new(struct kmscon_terminal **out, struct ev_eloop *loop, - struct uterm_video *video, struct uterm_input *input) { struct kmscon_terminal *term; int ret; - if (!out || !loop || !video || !input) + if (!out || !loop || !input) return -EINVAL; term = malloc(sizeof(*term)); @@ -335,7 +333,6 @@ int kmscon_terminal_new(struct kmscon_terminal **out, memset(term, 0, sizeof(*term)); term->ref = 1; term->eloop = loop; - term->video = video; term->input = input; kmscon_dlist_init(&term->screens); @@ -356,7 +353,6 @@ int kmscon_terminal_new(struct kmscon_terminal **out, goto err_pty; ev_eloop_ref(term->eloop); - uterm_video_ref(term->video); uterm_input_ref(term->input); *out = term; @@ -400,7 +396,6 @@ void kmscon_terminal_unref(struct kmscon_terminal *term) if (term->redraw) ev_eloop_unregister_idle_cb(term->eloop, draw_all, term); uterm_input_unref(term->input); - uterm_video_unref(term->video); ev_eloop_unref(term->eloop); free(term); } diff --git a/src/terminal.h b/src/terminal.h index 1488e61..2dfbca6 100644 --- a/src/terminal.h +++ b/src/terminal.h @@ -52,7 +52,6 @@ typedef void (*kmscon_terminal_event_cb) int kmscon_terminal_new(struct kmscon_terminal **out, struct ev_eloop *loop, - struct uterm_video *video, struct uterm_input *input); void kmscon_terminal_ref(struct kmscon_terminal *term); void kmscon_terminal_unref(struct kmscon_terminal *term); diff --git a/src/ui.c b/src/ui.c index 378e275..f3e6019 100644 --- a/src/ui.c +++ b/src/ui.c @@ -182,7 +182,7 @@ int kmscon_ui_new(struct kmscon_ui **out, ui->input = input; kmscon_dlist_init(&ui->video_list); - ret = kmscon_terminal_new(&ui->term, eloop, video, ui->input); + ret = kmscon_terminal_new(&ui->term, eloop, ui->input); if (ret) goto err_free;