From patchwork Tue Nov 4 13:45:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 40152 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DC08521894 for ; Tue, 4 Nov 2014 13:47:17 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gq15sf648539lab.2 for ; Tue, 04 Nov 2014 05:47:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=m/+iZJYtgAh/TGn8egtuQv6o9XXisbVXbP/4HT5L+bw=; b=ZcNgNer+ghgp+6xs0zwo3Lb38PEfiaM0V89rZEpVs2ZokQXotLug3JgIOVvlKm8CBF LYWqp35l3n47jiIxXfBknnL6qfnI1V6BYVh8oEwjDkHjW/mZ1g38vYB90EPVqq+pHsaO uyS3ZKmoYM0c+aMvsNMiuemw0KMTU77ac//nyiWO+vKX9MIedNVQaEnRWlF69z+Zz9c2 cx0r/obos9PjTDiy2Gxr0zLtao7Q2zmofWJ8IyFdmLqpjB/ySbKD/BAiJ/jldy6mtoJt ha4IqwqNM0WI/igLcal9JCgzKCEVKBtv2dFTQaJFG6mWTd024zGxG1IKjtQtN3zM9P5z LrHA== X-Gm-Message-State: ALoCoQnqvL89Qb6jFez1pjwIZDSyRwfYasfNkyYeKmdOExm4L55Uh/ITvJFq82Vaq1oyjK2EZMs0 X-Received: by 10.152.37.37 with SMTP id v5mr15275laj.9.1415108836793; Tue, 04 Nov 2014 05:47:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.4 with SMTP id ky4ls916034lab.23.gmail; Tue, 04 Nov 2014 05:47:16 -0800 (PST) X-Received: by 10.112.54.229 with SMTP id m5mr59468901lbp.11.1415108836325; Tue, 04 Nov 2014 05:47:16 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id k10si686399lbp.126.2014.11.04.05.47.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 05:47:16 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so908291lab.12 for ; Tue, 04 Nov 2014 05:47:16 -0800 (PST) X-Received: by 10.112.52.37 with SMTP id q5mr23730574lbo.32.1415108836250; Tue, 04 Nov 2014 05:47:16 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp116811lbc; Tue, 4 Nov 2014 05:47:15 -0800 (PST) X-Received: by 10.224.51.11 with SMTP id b11mr7025233qag.33.1415108834744; Tue, 04 Nov 2014 05:47:14 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p11si748783qar.67.2014.11.04.05.47.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 04 Nov 2014 05:47:14 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:40653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XleS1-0000cQ-Oy for patch@linaro.org; Tue, 04 Nov 2014 08:47:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XleQu-0007px-G0 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 08:46:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XleQk-0003Zh-VC for qemu-devel@nongnu.org; Tue, 04 Nov 2014 08:46:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XleQk-0003ZN-Mr for qemu-devel@nongnu.org; Tue, 04 Nov 2014 08:45:54 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA4Djqn3031186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 4 Nov 2014 08:45:53 -0500 Received: from nilsson.home.kraxel.org (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA4DjpQ1007762; Tue, 4 Nov 2014 08:45:52 -0500 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id 8E9F481BBA; Tue, 4 Nov 2014 14:45:51 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 4 Nov 2014 14:45:45 +0100 Message-Id: <1415108746-21448-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1415108746-21448-1-git-send-email-kraxel@redhat.com> References: <1415108746-21448-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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] [PULL v2 4/5] gtk: Hide the menubar when in fullscreen mode (lp 1294898) 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kraxel@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Cole Robinson In fullscreen mode, we attempt to shrink the menubar to 1 pixel in height, so it takes up as little room as possible while still allowing us to use the keyboard shortcuts for its various operations. However this shrinking is disregarded on gtk3, so the entire menu bar is visible, which isn't very pleasant. This patch hides the menu bar instead. The side effect is that the only keyboard shortcuts that will work in this mode are the ones that we explicitly register on the top level window and not the menu bar. The previous patches changed the fullscreen and vc shortcuts to work like that, which I think are the only ones that really matter in for the fullscreen case. https://bugs.launchpad.net/qemu/+bug/1294898 Signed-off-by: Cole Robinson Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 552a73b..de564cc 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1104,7 +1104,7 @@ static void gd_menu_full_screen(GtkMenuItem *item, void *opaque) if (!s->full_screen) { gtk_notebook_set_show_tabs(GTK_NOTEBOOK(s->notebook), FALSE); - gtk_widget_set_size_request(s->menu_bar, 0, 0); + gtk_widget_hide(s->menu_bar); if (vc->type == GD_VC_GFX) { gtk_widget_set_size_request(vc->gfx.drawing_area, -1, -1); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item), @@ -1115,7 +1115,7 @@ static void gd_menu_full_screen(GtkMenuItem *item, void *opaque) } else { gtk_window_unfullscreen(GTK_WINDOW(s->window)); gd_menu_show_tabs(GTK_MENU_ITEM(s->show_tabs_item), s); - gtk_widget_set_size_request(s->menu_bar, -1, -1); + gtk_widget_show(s->menu_bar); s->full_screen = FALSE; if (vc->type == GD_VC_GFX) { vc->gfx.scale_x = 1.0;