ui: enumerate displays on wakeup

We might have missed a display when our handler was not registered, yet.
So enumerate these displays on wakeup so we can be sure that we have all
displays registered with the terminal subsystem.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-06-24 10:30:28 +02:00
parent 148655bb7d
commit acbef47c5e

View File

@ -53,6 +53,7 @@ static void video_event(struct uterm_video *video,
{
struct kmscon_ui *ui = data;
int ret;
struct uterm_display *disp;
if (ev->action == UTERM_NEW) {
if (uterm_display_get_state(ev->display) == UTERM_DISPLAY_INACTIVE) {
@ -64,6 +65,14 @@ static void video_event(struct uterm_video *video,
return;
}
kmscon_terminal_add_display(ui->term, ev->display);
} else if (ev->action == UTERM_WAKE_UP) {
disp = uterm_video_get_displays(video);
while (disp) {
ev->display = disp;
ev->action = UTERM_NEW;
video_event(video, ev, data);
disp = uterm_display_next(disp);
}
}
}