console: fix console resize
PATCH v2 1/1 console: fix console resize
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.
Fixes cd958edb1fae85d0c7d1e1acbff82d22724e8d64
Signed-off-by Gerd Hoffmann <[email protected]>
Reviewed-by Marc-André Lureau <[email protected]>
--- ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ui/console.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.3.1
Quoted 18 lines · Gerd Hoffmann
Only skip surface reallocation in case the old surface was created using
qemu_alloc_display(viaqemu_create_displaysurface) too, otherwise we might end up with a DisplaySurface with the wrong backing storage.Fixes cd958edb1fae85d0c7d1e1acbff82d22724e8d64Signed-off-by Gerd Hoffmann <[email protected]>Reviewed-by Marc-André Lureau <[email protected]>--- ui/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ui/console.c +0
-0
ui/console.c void qemu_console_resize(QemuConsole *s, int width, int height) · line 2127
Quoted 8 lines
ui/console.c +1
-1@@ -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 protected]>
Thanks
Laszlo