From patchwork Mon Mar 17 20:06:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 331159 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 16F5B2C00C3 for ; Tue, 18 Mar 2014 07:07:18 +1100 (EST) Received: from localhost ([::1]:60029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdoZ-0000xN-MO for incoming@patchwork.ozlabs.org; Mon, 17 Mar 2014 16:07:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdo8-0000po-3p for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPdo2-0003EP-4V for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:06:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPdo1-0003EI-T2 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 16:06:42 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2HK6eU3011526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 17 Mar 2014 16:06:40 -0400 Received: from colepc.home.com (ovpn-113-63.phx2.redhat.com [10.3.113.63]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2HK6WeD008397; Mon, 17 Mar 2014 16:06:39 -0400 From: Cole Robinson To: qemu-devel@nongnu.org Date: Mon, 17 Mar 2014 16:06:27 -0400 Message-Id: <8f5e52223220b7be0aa7113343def80682a66b1c.1395085847.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann , Anthony Liguori , Cole Robinson Subject: [Qemu-devel] [PATCH v3 5/5] gtk: Use ctrl+alt+q for quit accelerator 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 Using the standard ctrl+q makes it too easy to kill the whole VM. Using ctrl+alt+FOO is consistent with our other accelerators. https://bugzilla.redhat.com/show_bug.cgi?id=1062393 Signed-off-by: Cole Robinson --- v3: Fix building with old gtk2 ui/gtk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 9670567..ab08fe0 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -88,6 +88,7 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh) #define GDK_KEY_2 GDK_2 #define GDK_KEY_f GDK_f #define GDK_KEY_g GDK_g +#define GDK_KEY_q GDK_q #define GDK_KEY_plus GDK_plus #define GDK_KEY_minus GDK_minus #endif @@ -1328,7 +1329,7 @@ static GtkWidget *gd_create_menu_machine(GtkDisplayState *s, GtkAccelGroup *acce gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->quit_item), "/Machine/Quit"); gtk_accel_map_add_entry("/Machine/Quit", - GDK_KEY_q, GDK_CONTROL_MASK); + GDK_KEY_q, HOTKEY_MODIFIERS); gtk_menu_shell_append(GTK_MENU_SHELL(machine_menu), s->quit_item); return machine_menu;