[4/7] qxl: call dpy_gfx_resize when entering vga mode

Message ID 1351848919-10388-5-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Nov. 2, 2012, 9:35 a.m.
When entering vga mode the display size likely changes,
notify all displaychangelisteners about this.

Probably went unnoticed for a while as one if the first
things the guest does after leaving qxl native mode and
entering qxl vga mode is to set the vga video mode.  But
there is still a small window where qemu can operate on
stale data, leading to crashes now and then.


Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
 hw/qxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/hw/qxl.c b/hw/qxl.c
index 063970d..e7bf3a1 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1069,7 +1069,7 @@  static void qxl_enter_vga_mode(PCIQXLDevice *d)
     d->mode = QXL_MODE_VGA;
-    memset(&d->ssd.dirty, 0, sizeof(d->ssd.dirty));
+    dpy_gfx_resize(d->ssd.ds);