diff mbox

vnc: send cursor when a new client is connecting

Message ID 1456929142-14033-1-git-send-email-fziglio@redhat.com
State New
Headers show

Commit Message

Frediano Ziglio March 2, 2016, 2:32 p.m. UTC
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>
---
 ui/vnc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Gerd Hoffmann March 8, 2016, 9:45 a.m. UTC | #1
On Mi, 2016-03-02 at 14:32 +0000, Frediano Ziglio wrote:
> 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>

added to ui patch queue.

thanks,
  Gerd
diff mbox

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index ce4c669..825e65b 100644
--- 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);