From patchwork Thu Jun 22 07:41:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 779379 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 3wtYSd5S9Vz9sNP for ; Thu, 22 Jun 2017 17:42:09 +1000 (AEST) Received: from localhost ([::1]:57463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNwkh-0005mj-FM for incoming@patchwork.ozlabs.org; Thu, 22 Jun 2017 03:42:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNwkC-0005lC-In for qemu-devel@nongnu.org; Thu, 22 Jun 2017 03:41:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNwkB-0007IU-Pg for qemu-devel@nongnu.org; Thu, 22 Jun 2017 03:41:36 -0400 Received: from mx2.suse.de ([195.135.220.15]:38341 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dNwkB-0007IN-Iy; Thu, 22 Jun 2017 03:41:35 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5840FAC03; Thu, 22 Jun 2017 07:41:34 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Thu, 22 Jun 2017 09:41:58 +0200 Message-Id: <1498117318-162102-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.5.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH] input: Decrement queue count on kbd delay 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: qemu-trivial@nongnu.org, qemu-stable@nongnu.org, Gerd Hoffmann Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Delays in the input layer are special cased input events. Every input event is accounted for in a global intput queue count. The special cased delays however did not get removed from the queue, leading to queue overruns and thus silent key drops after typing quite a few characters. Signed-off-by: Alexander Graf Fixes: be1a7176 ("input: add support for kbd delays") Cc: qemu-stable@nongnu.org --- ui/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/input.c b/ui/input.c index 290ca9f..650a57e 100644 --- a/ui/input.c +++ b/ui/input.c @@ -257,6 +257,7 @@ static void qemu_input_queue_process(void *opaque) item = QTAILQ_FIRST(queue); g_assert(item->type == QEMU_INPUT_QUEUE_DELAY); QTAILQ_REMOVE(queue, item, node); + queue_count--; g_free(item); while (!QTAILQ_EMPTY(queue)) {