From patchwork Tue Jan 28 09:57:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 314688 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 16AB42C009E for ; Tue, 28 Jan 2014 22:22:27 +1100 (EST) Received: from localhost ([::1]:36272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W85bg-0007Q2-1n for incoming@patchwork.ozlabs.org; Tue, 28 Jan 2014 05:09:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W85Qg-0000xt-U0 for qemu-devel@nongnu.org; Tue, 28 Jan 2014 04:58:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W85QY-0006kS-JZ for qemu-devel@nongnu.org; Tue, 28 Jan 2014 04:58:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W85QY-0006jz-A9 for qemu-devel@nongnu.org; Tue, 28 Jan 2014 04:57:54 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0S9vnQW009436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jan 2014 04:57:50 -0500 Received: from nilsson.home.kraxel.org (vpn1-6-106.ams2.redhat.com [10.36.6.106]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0S9vie7028873; Tue, 28 Jan 2014 04:57:48 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 9F9AC80CF4; Tue, 28 Jan 2014 10:57:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 28 Jan 2014 10:57:26 +0100 Message-Id: <1390903055-479-34-git-send-email-kraxel@redhat.com> In-Reply-To: <1390903055-479-1-git-send-email-kraxel@redhat.com> References: <1390903055-479-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori Subject: [Qemu-devel] [PATCH 33/42] input-legacy: remove kbd_mouse_has_absolute 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 Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 3 --- ui/input-legacy.c | 21 ++------------------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/ui/console.h b/include/ui/console.h index c7f4e4f..53e956d 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -54,9 +54,6 @@ int kbd_mouse_is_absolute(void); void qemu_add_mouse_mode_change_notifier(Notifier *notify); void qemu_remove_mouse_mode_change_notifier(Notifier *notify); -/* Of all the mice, is there one that generates absolute events */ -int kbd_mouse_has_absolute(void); - struct MouseTransformInfo { /* Touchscreen resolution */ int x; diff --git a/ui/input-legacy.c b/ui/input-legacy.c index 3ac30e2..22796fa 100644 --- a/ui/input-legacy.c +++ b/ui/input-legacy.c @@ -366,20 +366,16 @@ void qemu_remove_kbd_event_handler(QEMUPutKbdEntry *entry) static void check_mode_change(void) { - static int current_is_absolute, current_has_absolute; + static int current_is_absolute; int is_absolute; - int has_absolute; is_absolute = kbd_mouse_is_absolute(); - has_absolute = kbd_mouse_has_absolute(); - if (is_absolute != current_is_absolute || - has_absolute != current_has_absolute) { + if (is_absolute != current_is_absolute) { notifier_list_notify(&mouse_mode_notifiers, NULL); } current_is_absolute = is_absolute; - current_has_absolute = has_absolute; } static void legacy_mouse_event(DeviceState *dev, QemuConsole *src, @@ -567,19 +563,6 @@ int kbd_mouse_is_absolute(void) return QTAILQ_FIRST(&mouse_handlers)->qemu_put_mouse_event_absolute; } -int kbd_mouse_has_absolute(void) -{ - QEMUPutMouseEntry *entry; - - QTAILQ_FOREACH(entry, &mouse_handlers, node) { - if (entry->qemu_put_mouse_event_absolute) { - return 1; - } - } - - return 0; -} - MouseInfoList *qmp_query_mice(Error **errp) { MouseInfoList *mice_list = NULL;