Commit 3ef0c573 authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

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.

Cc: 1658634@bugs.launchpad.net
Fixes: cd958edb
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: default avatarLaszlo Ersek <lersek@redhat.com>
Message-id: 1485256239-12219-1-git-send-email-kraxel@redhat.com
parent 27b224a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2116,7 +2116,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;