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:
parent
45c2284ece
commit
181d26f0e7
@ -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);
|
||||
}
|
||||
|
||||
|
2
src/ui.c
2
src/ui.c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user