Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ui/console: call dpy_gfx_update() regardless of have_gfx
The function will handle the case when no listeners are gfx, without
extra meaningful cost.

This allows to get rid of DisplayState dependency in VC implementation.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-8-marcandre.lureau@redhat.com>
  • Loading branch information
elmarco authored and Patchew Applier committed Sep 1, 2023
1 parent 074b240 commit bc9b8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/console.c
Expand Up @@ -1087,7 +1087,7 @@ static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len)
console_putchar(s, buf[i]);
}
console_show_cursor(s, 1);
if (s->ds->have_gfx && s->update_x0 < s->update_x1) {
if (s->update_x0 < s->update_x1) {
dpy_gfx_update(s, s->update_x0, s->update_y0,
s->update_x1 - s->update_x0,
s->update_y1 - s->update_y0);
Expand Down

0 comments on commit bc9b8bc

Please sign in to comment.