From patchwork Thu Oct 13 09:32:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 9374615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 030FE60779 for ; Thu, 13 Oct 2016 09:38:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E844529F4E for ; Thu, 13 Oct 2016 09:38:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD0DF29F55; Thu, 13 Oct 2016 09:38:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F1E329F4E for ; Thu, 13 Oct 2016 09:38:21 +0000 (UTC) Received: from localhost ([::1]:38877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucSy-0003Th-Kb for patchwork-qemu-devel@patchwork.kernel.org; Thu, 13 Oct 2016 05:38:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucNw-00087R-6w for qemu-devel@nongnu.org; Thu, 13 Oct 2016 05:33:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bucNs-0002dV-PD for qemu-devel@nongnu.org; Thu, 13 Oct 2016 05:33:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucNs-0002cu-Je for qemu-devel@nongnu.org; Thu, 13 Oct 2016 05:33:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24E2331B313 for ; Thu, 13 Oct 2016 09:33:04 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-30.ams2.redhat.com [10.36.116.30]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9D9X2qJ006992; Thu, 13 Oct 2016 05:33:03 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 2E4DB80DDC; Thu, 13 Oct 2016 11:33:00 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 13 Oct 2016 11:32:55 +0200 Message-Id: <1476351178-32540-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1476351178-32540-1-git-send-email-kraxel@redhat.com> References: <1476351178-32540-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 13 Oct 2016 09:33:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 07/10] ui: remove bogus call to reset_keys() in vnc_init_state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Daniel P. Berrange" The vnc_init_state method calls reset_keys() to reset the modifier key state. This was originally added in commit 53762ddb277c690e486d0e17b10591774248c8cf Author: malc Date: Mon Dec 1 20:57:52 2008 +0000 Reset the key modifiers upon client connect This was valid at this time because there was only the single VncState object which was persistent across client connections and so needed resetting. The persistent data was later split off into VncDisplay and VncState was allocated at time of client connection: commit 753b4053311ff1437d99726970b1e7e6bf38249b Author: aliguori Date: Mon Feb 16 14:59:30 2009 +0000 Support multiple VNC clients (Brian Kress) at which point the modifier state is always 0 due to use of g_new0. As such the reset_keys() call has been a no-op ever since. Signed-off-by: Daniel P. Berrange Message-id: 1475163940-26094-8-git-send-email-berrange@redhat.com Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index d1f33d3..7c8f07d 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3086,7 +3086,6 @@ void vnc_init_state(VncState *vs) vnc_write(vs, "RFB 003.008\n", 12); vnc_flush(vs); vnc_read_when(vs, protocol_version, 12); - reset_keys(vs); if (vs->vd->lock_key_sync) vs->led = qemu_add_led_event_handler(kbd_leds, vs);