terminal: avoid adding displays multiple times
We now enumerate displays on wake-up so we might end up adding a display twice. This causes the display to be redrawn twice which is nasty so we avoid it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
2757f1c691
commit
325412bc15
@ -129,6 +129,12 @@ static int add_display(struct kmscon_terminal *term, struct uterm_display *disp)
|
||||
struct screen *scr;
|
||||
int ret;
|
||||
unsigned int width, height;
|
||||
struct screen *iter;
|
||||
|
||||
for (iter = term->screens; iter; iter = iter->next) {
|
||||
if (iter->disp == disp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
scr = malloc(sizeof(*scr));
|
||||
if (!scr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user