diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-21 20:08:55 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-21 20:08:55 +0000 |
commit | f8b77ce4e1f121d9912e5a45768c08f93306f447 (patch) | |
tree | 6200c114ca1298b56055e5202614258fcfae4e66 /vnc.c | |
parent | 8d05f919af2ff3dd2446b7329bae29cb08186868 (diff) | |
download | qemu-f8b77ce4e1f121d9912e5a45768c08f93306f447.tar.gz qemu-f8b77ce4e1f121d9912e5a45768c08f93306f447.tar.bz2 qemu-f8b77ce4e1f121d9912e5a45768c08f93306f447.zip |
add DisplayState->idle (Samuel Thibault)
Add idle field to DisplayState struct, so drivers can figure
the display is idle and take advantage of that.
The xen framebuffer driver will use this to communicate the
idle state to the guest, so it knows it can stop doing updates
to a virtual display which is invisible anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5056 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vnc.c')
-rw-r--r-- | vnc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -660,6 +660,7 @@ static int vnc_client_io_error(VncState *vs, int ret, int last_errno) qemu_set_fd_handler2(vs->csock, NULL, NULL, NULL, NULL); closesocket(vs->csock); vs->csock = -1; + vs->ds->idle = 1; buffer_reset(&vs->input); buffer_reset(&vs->output); vs->need_update = 0; @@ -1920,6 +1921,7 @@ static int protocol_version(VncState *vs, uint8_t *version, size_t len) static void vnc_connect(VncState *vs) { VNC_DEBUG("New client on socket %d\n", vs->csock); + vs->ds->idle = 0; socket_set_nonblock(vs->csock); qemu_set_fd_handler2(vs->csock, NULL, vnc_client_read, NULL, vs); vnc_write(vs, "RFB 003.008\n", 12); @@ -1959,6 +1961,7 @@ void vnc_display_init(DisplayState *ds) exit(1); ds->opaque = vs; + ds->idle = 1; vnc_state = vs; vs->display = NULL; vs->password = NULL; |