Skip to contentSkip to conversation

implement vnc_dpy_setdata

PATCH Applied Gerd Hoffmann 2 participants 2 messages Mar 8, 2012 – Mar 13, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 implement vnc_dpy_setdata

The comment is wrong, we have to do something in the setdata callback. Changing the framebuffer backing storage (happens when the guest pans the display) renders the whole screen content invalid.

Trigger #1: cirrus vga + 32bit linux guest + vesafb with ypan enabled. Trigger #2: std vga + http://patchwork.ozlabs.org/patch/145479/

---
 ui/vnc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
ui/vnc.c +4 -1
index 8ee39bc..bdec33a 100644
@@ -1936,7 +1936,10 @@ static void pixel_format_message (VncState *vs) {
 
 static void vnc_dpy_setdata(DisplayState *ds)
 {
-    /* We don't have to do anything */
+    VncDisplay *vd = ds->opaque;
+
+    *(vd->guest.ds) = *(ds->surface);
+    vnc_dpy_update(ds, 0, 0, ds_get_width(ds), ds_get_height(ds));
 }
 
 static void vnc_colordepth(VncState *vs)
Signature · 1 line
1.7.1
#1 lore raw
Quoted 8 lines · Gerd Hoffmann

The comment is wrong, we have to do something in the setdata callback. Changing the framebuffer backing storage (happens when the guest pans the display) renders the whole screen content invalid.

Trigger #1: cirrus vga + 32bit linux guest + vesafb with ypan enabled. Trigger #2: std vga + http://patchwork.ozlabs.org/patch/145479/

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 20 lines
---
  ui/vnc.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)
ui/vnc.c +4 -1
index 8ee39bc..bdec33a 100644
@@ -1936,7 +1936,10 @@ static void pixel_format_message (VncState *vs) {
 
  static void vnc_dpy_setdata(DisplayState *ds)
  {
-    /* We don't have to do anything */
+    VncDisplay *vd = ds->opaque;
+
+    *(vd->guest.ds) = *(ds->surface);
+    vnc_dpy_update(ds, 0, 0, ds_get_width(ds), ds_get_height(ds));
  }
 
  static void vnc_colordepth(VncState *vs)