From patchwork Tue Dec 12 14:04:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 847511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3yx1v03KpRz9sBZ for ; Wed, 13 Dec 2017 01:10:36 +1100 (AEDT) Received: from localhost ([::1]:58524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOlGU-0001z8-FT for incoming@patchwork.ozlabs.org; Tue, 12 Dec 2017 09:10:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOlBV-0005PW-7Y for qemu-devel@nongnu.org; Tue, 12 Dec 2017 09:05:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOlBP-00056K-D4 for qemu-devel@nongnu.org; Tue, 12 Dec 2017 09:05:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57326) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eOlBP-00055c-6d for qemu-devel@nongnu.org; Tue, 12 Dec 2017 09:05:19 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A2BEC070E1F for ; Tue, 12 Dec 2017 14:05:18 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B0F160636; Tue, 12 Dec 2017 14:05:16 +0000 (UTC) From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Tue, 12 Dec 2017 14:04:58 +0000 Message-Id: <20171212140459.2234-4-berrange@redhat.com> In-Reply-To: <20171212140459.2234-1-berrange@redhat.com> References: <20171212140459.2234-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 12 Dec 2017 14:05:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v6 3/4] ui: add fix for GTK Pause key handling on Win32 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Versions of GTK prior to 3.22 did not correctly set the keyval field when VK_PAUSE was received on Windows. Signed-off-by: Daniel P. Berrange --- ui/gtk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 749999df44..89cc81b708 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1207,6 +1207,12 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque) } if (key->keyval == GDK_KEY_Pause) { +#ifdef G_OS_WIN32 + /* for some reason GDK does not fill keyval for VK_PAUSE + * See https://bugzilla.gnome.org/show_bug.cgi?id=769214 + */ + || key->hardware_keycode == VK_PAUSE +#endif qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE, key->type == GDK_KEY_PRESS); return TRUE;