]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
fix sdl window resize
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 3 Aug 2009 15:10:43 +0000 (16:10 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 02:23:37 +0000 (21:23 -0500)
Hi all,
this patch fixes the sdl window resize event handler so that it doesn't
require the emulated graphic card (or console.c) to call
qemu_console_resize.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

sdl.c

diff --git a/sdl.c b/sdl.c
index 3be4d9698f0b80796db9bcdc1d1cc4ef276bb0f3..a8f5edf989ec18cf6bc1208d7b9820ab4a9a757e 100644 (file)
--- a/sdl.c
+++ b/sdl.c
@@ -720,6 +720,10 @@ static void sdl_refresh(DisplayState *ds)
                 bpp = 32;
             do_sdl_resize(rev->w, rev->h, bpp);
             scaling_active = 1;
+            if (!is_buffer_shared(ds->surface)) {
+                ds->surface = qemu_resize_displaysurface(ds, ds_get_width(ds), ds_get_height(ds));
+                dpy_resize(ds);
+            }
             vga_hw_invalidate();
             vga_hw_update();
             break;