On 01/24/17 12:10, Gerd Hoffmann wrote: > Only skip surface reallocation in case the old surface was created using > qemu_alloc_display (via qemu_create_displaysurface) too, otherwise we > might end up with a DisplaySurface with the wrong backing storage. > > Cc: <email address hidden> > Fixes: cd958edb1fae85d0c7d1e1acbff82d22724e8d64 > Signed-off-by: Gerd Hoffmann <email address hidden> > Reviewed-by: Marc-André Lureau <email address hidden> > --- > ui/console.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ui/console.c b/ui/console.c > index b9575f2..d573351 100644 > --- a/ui/console.c > +++ b/ui/console.c > @@ -2121,7 +2121,7 @@ void qemu_console_resize(QemuConsole *s, int width, int height) > > assert(s->console_type == GRAPHIC_CONSOLE); > > - if (s->surface && > + if (s->surface && (s->surface->flags & QEMU_ALLOCATED_FLAG) && > pixman_image_get_width(s->surface->image) == width && > pixman_image_get_height(s->surface->image) == height) { > return; >
Tested-by: Laszlo Ersek <email address hidden> Cc: <email address hidden>
Thanks Laszlo
On 01/24/17 12:10, Gerd Hoffmann wrote: displaysurface) too, otherwise we 0c7d1e1acbff82d 22724e8d64 resize( QemuConsole *s, int width, int height) s->console_ type == GRAPHIC_CONSOLE); FLAG) && image_get_ width(s- >surface- >image) == width && image_get_ height( s->surface- >image) == height) {
> Only skip surface reallocation in case the old surface was created using
> qemu_alloc_display (via qemu_create_
> might end up with a DisplaySurface with the wrong backing storage.
>
> Cc: <email address hidden>
> Fixes: cd958edb1fae85d
> Signed-off-by: Gerd Hoffmann <email address hidden>
> Reviewed-by: Marc-André Lureau <email address hidden>
> ---
> ui/console.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/console.c b/ui/console.c
> index b9575f2..d573351 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -2121,7 +2121,7 @@ void qemu_console_
>
> assert(
>
> - if (s->surface &&
> + if (s->surface && (s->surface->flags & QEMU_ALLOCATED_
> pixman_
> pixman_
> return;
>
Tested-by: Laszlo Ersek <email address hidden>
Cc: <email address hidden>
Thanks
Laszlo