vnc: send cursor when a new client is connecting
authorFrediano Ziglio <fziglio@redhat.com>
Wed, 2 Mar 2016 14:32:22 +0000 (14:32 +0000)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 8 Mar 2016 09:45:01 +0000 (10:45 +0100)
If you have hardware cursor and you are reconnecting the VNC client
you need to send the cursor. Failing to do so make the cursor invisible
till is changed.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Message-id: 1456929142-14033-1-git-send-email-fziglio@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c

index 6cd63141c4852549f970552c586a8f1315024235..729f630e3a89f3a8f55e89ea718a2146d65a54ab 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2046,6 +2046,9 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
             break;
         case VNC_ENCODING_RICH_CURSOR:
             vs->features |= VNC_FEATURE_RICH_CURSOR_MASK;
+            if (vs->vd->cursor) {
+                vnc_cursor_define(vs);
+            }
             break;
         case VNC_ENCODING_EXT_KEY_EVENT:
             send_ext_key_event_ack(vs);