2011-05-31 19:35:29 +02:00
|
|
|
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
2008-11-21 15:57:01 +01:00
|
|
|
===================================================================
|
2011-05-31 19:35:29 +02:00
|
|
|
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
|
|
|
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
2011-01-14 19:24:51 +01:00
|
|
|
@@ -1734,6 +1734,25 @@ static int protocol_client_msg(VncState
|
2008-11-21 15:57:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
set_encodings(vs, (int32_t *)(data + 4), limit);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * The initialization of a VNC connection can race with xenfb changing
|
|
|
|
+ * the resolution. This happens when the VNC connection is already
|
|
|
|
+ * established, but the client has not yet advertised has_resize, so it
|
|
|
|
+ * won't get notified of the switch.
|
|
|
|
+ *
|
|
|
|
+ * Therefore we resend the resolution as soon as the client has sent its
|
|
|
|
+ * encodings.
|
|
|
|
+ */
|
|
|
|
+ if (vs->has_resize) {
|
|
|
|
+ /* Resize the VNC window */
|
|
|
|
+ vnc_write_u8(vs, 0); /* msg id */
|
|
|
|
+ vnc_write_u8(vs, 0);
|
|
|
|
+ vnc_write_u16(vs, 1); /* number of rects */
|
2009-05-04 18:38:09 +02:00
|
|
|
+ vnc_framebuffer_update(vs, 0, 0, vs->serverds.width, vs->serverds.height, -223);
|
2008-11-21 15:57:01 +01:00
|
|
|
+
|
|
|
|
+ vnc_flush(vs);
|
|
|
|
+ }
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
if (len == 1)
|