ui: explicitely remove displays from terminals

Move display-removal from terinal subsystem to UI subsystem to avoid
needing video-callback in the terminal subsystem.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-21 15:47:51 +02:00
parent 45c2284ece
commit 181d26f0e7
2 changed files with 3 additions and 3 deletions

View File

@ -246,9 +246,7 @@ static void video_event(struct uterm_video *video,
{
struct kmscon_terminal *term = data;
if (ev->action == UTERM_GONE)
rm_display(term, ev->display);
else if (ev->action == UTERM_WAKE_UP)
if (ev->action == UTERM_WAKE_UP)
schedule_redraw(term);
}

View File

@ -86,6 +86,8 @@ static void video_event(struct uterm_video *video,
if (ev->action == UTERM_NEW) {
video_activate(vid, ev->display);
kmscon_terminal_add_display(ui->term, ev->display);
} else if (ev->action == UTERM_GONE) {
kmscon_terminal_remove_display(ui->term, ev->display);
} else if (ev->action == UTERM_WAKE_UP) {
disp = uterm_video_get_displays(video);
while (disp) {