From patchwork Wed Mar 2 14:32:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frediano Ziglio X-Patchwork-Id: 590994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 551C61402DD for ; Thu, 3 Mar 2016 01:32:50 +1100 (AEDT) Received: from localhost ([::1]:56854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7pY-0002GA-D6 for incoming@patchwork.ozlabs.org; Wed, 02 Mar 2016 09:32:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7pK-0001yl-Lf for qemu-devel@nongnu.org; Wed, 02 Mar 2016 09:32:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ab7pF-0004sc-Nc for qemu-devel@nongnu.org; Wed, 02 Mar 2016 09:32:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab7pF-0004s2-Iz for qemu-devel@nongnu.org; Wed, 02 Mar 2016 09:32:29 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id C2AFE7F082; Wed, 2 Mar 2016 14:32:28 +0000 (UTC) Received: from rhwork.redhat.com (vpn-60-141.rdu2.redhat.com [10.10.60.141]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u22EWPKL029186; Wed, 2 Mar 2016 09:32:26 -0500 From: Frediano Ziglio To: Gerd Hoffmann Date: Wed, 2 Mar 2016 14:32:22 +0000 Message-Id: <1456929142-14033-1-git-send-email-fziglio@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: spice-devel@lists.freedesktop.org, qemu-devel@nongnu.org, Frediano Ziglio Subject: [Qemu-devel] [PATCH] vnc: send cursor when a new client is connecting X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- ui/vnc.c | 3 +++ 1 file changed, 3 insertions(+) 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);