From patchwork Thu May 10 23:07:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Wu X-Patchwork-Id: 10392537 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 0D4C86053D for ; Thu, 10 May 2018 23:09:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9C2228865 for ; Thu, 10 May 2018 23:09:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC47D28DA9; Thu, 10 May 2018 23:09:33 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 5ABED28865 for ; Thu, 10 May 2018 23:09:33 +0000 (UTC) Received: from localhost ([::1]:35912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGugm-0003H9-Kv for patchwork-qemu-devel@patchwork.kernel.org; Thu, 10 May 2018 19:09:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGuf4-0002eo-Tl for qemu-devel@nongnu.org; Thu, 10 May 2018 19:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGuf3-0005HT-Vy for qemu-devel@nongnu.org; Thu, 10 May 2018 19:07:46 -0400 Received: from mail.lekensteyn.nl ([2a02:2308::360:1:25]:54765) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGuf3-0005GM-MI for qemu-devel@nongnu.org; Thu, 10 May 2018 19:07:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lekensteyn.nl; s=s2048-2015-q1; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=XgUydOLX7I1O0MvdKoM4dZjdzS5mlzQYUuLCKq9q6pU=; b=vU6XHfrXKxo+TkZDnmOBt2d69mfDg+2VkIQUw1iySOSr0xIxwinYz9RZvOPQBO+ta7pSaKugNKqB0Cyii15DCmaVZ9/uL+l973bFh+teIRV7n9J5m7OXn16C0PsDnS4rlxe9IZaZqxW10UqmZr9fYzdoX3wOREpGO/r3rw14KadJMEpml172+80RH74wH9MC6GrsaUj5Pnt0+ZAm1p7rauJeLzhmB7OKB6g/qtT5WYkShuebDyty+p74e9a+u18P1t3gez7N036D9yiHNIBIBxXOXJDdLN8SyAuv3wam2mHEhsQJhOpXnIKHZBb76XVusXmV1K+paZm1gEMdgWYNIA==; Received: by lekensteyn.nl with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1fGuez-000091-UX; Fri, 11 May 2018 01:07:42 +0200 From: Peter Wu To: qemu-devel@nongnu.org Date: Fri, 11 May 2018 01:07:39 +0200 Message-Id: <20180510230739.28459-2-peter@lekensteyn.nl> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180510230739.28459-1-peter@lekensteyn.nl> References: <20180510230739.28459-1-peter@lekensteyn.nl> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a02:2308::360:1:25 Subject: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key 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 The F10 key is used in various applications, disable it unconditionally (do not limit it to grab mode). Note that this property is deprecated and might be removed in the future (GTK+ commit b082fb598d). Fixes: https://bugs.launchpad.net/qemu/+bug/1726910 Signed-off-by: Peter Wu --- ui/gtk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 9e5390f2c2..6ad6cacfaa 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2321,6 +2321,8 @@ static GtkWidget *gd_create_menu_view(GtkDisplayState *s) static void gd_create_menus(GtkDisplayState *s) { + GtkSettings *settings; + s->accel_group = gtk_accel_group_new(); s->machine_menu = gd_create_menu_machine(s); s->view_menu = gd_create_menu_view(s); @@ -2336,6 +2338,10 @@ static void gd_create_menus(GtkDisplayState *s) g_object_set_data(G_OBJECT(s->window), "accel_group", s->accel_group); gtk_window_add_accel_group(GTK_WINDOW(s->window), s->accel_group); + + /* Disable the default "F10" menu shortcut. */ + settings = gtk_widget_get_settings(s->window); + g_object_set(G_OBJECT(settings), "gtk-menu-bar-accel", "", NULL); }