]> git.proxmox.com Git - mirror_qemu.git/blobdiff - ui/console.c
ui: do not create a surface when resizing a GL scanout
[mirror_qemu.git] / ui / console.c
index 79a01afd1ea7d0afe80ce84f94eb333224a98b6f..365a2c14b80924709fa8408b2f00b668c5618941 100644 (file)
@@ -2400,13 +2400,12 @@ static void vc_chr_open(Chardev *chr,
 
 void qemu_console_resize(QemuConsole *s, int width, int height)
 {
-    DisplaySurface *surface = qemu_console_surface(s);
+    DisplaySurface *surface;
 
     assert(s->console_type == GRAPHIC_CONSOLE);
 
-    if (surface && (surface->flags & QEMU_ALLOCATED_FLAG) &&
-        pixman_image_get_width(surface->image) == width &&
-        pixman_image_get_height(surface->image) == height) {
+    if (qemu_console_get_width(s, -1) == width &&
+        qemu_console_get_height(s, -1) == height) {
         return;
     }