From patchwork Thu Oct 30 19:34:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 39972 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F2A042405B for ; Fri, 31 Oct 2014 19:20:01 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf4506810lab.7 for ; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) 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: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=KVt/cnjQkhU0fB3VlIsjI+AotkfOGFmXXSJ0A0P/1l8=; b=XtoMQloiJvQcHdpNCr5YHxTSnaflWCtE328IIDda9FDPf5XlGWcTJogacgkzoJEHam x2zKRRgVeHlXzI3Amk3G2gy3DoCUQZlBQkTxlXvEj9XsyRfA3GApDX7hVWXcCvieddOC Xq/+dnVBXuXRbf1Fvhc3aXtrVIyApUi7SSxl0BKEJl7JRHgZhf1mYd5bTH76QSxgJ/ED j7LOFCss9DAdvp3rz4tflEan2z6aqzpQJuFtU8PsE3QAHaGKaCVmrBqpcEqrpgV3uEkB TngGFcmCNerMLOacSVaDtj8IDfG2g4Z6PwajILcP7OUnU+DzsYuEBm8bPOeRdiuOMHkQ s1lw== X-Gm-Message-State: ALoCoQnjwCnBq7ZC9CNsXcdT6tcTFLbEmmg6DP0Ibay+hYZQr4jupL0TWrpzw/0yX+FwvasPt7lD X-Received: by 10.112.138.202 with SMTP id qs10mr4279390lbb.5.1414783200873; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.33 with SMTP id cb1ls555194lad.89.gmail; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) X-Received: by 10.112.137.202 with SMTP id qk10mr28636520lbb.0.1414783200723; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id o5si18399236laj.1.2014.10.31.12.20.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 12:20:00 -0700 (PDT) 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 mc6so6868472lab.12 for ; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr28424074lbw.66.1414783200647; Fri, 31 Oct 2014 12:20:00 -0700 (PDT) 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.84.229 with SMTP id c5csp249338lbz; Fri, 31 Oct 2014 12:19:59 -0700 (PDT) X-Received: by 10.224.171.194 with SMTP id i2mr40243176qaz.59.1414783199217; Fri, 31 Oct 2014 12:19:59 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id r8si18640932qaj.16.2014.10.31.12.19.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 31 Oct 2014 12:19:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Received: from localhost ([::1]:41668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkHjq-0007oV-CW for patch@linaro.org; Fri, 31 Oct 2014 15:19:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkE8u-00062k-6c for qemu-devel@nongnu.org; Fri, 31 Oct 2014 11:31:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjvUn-0005fC-HP for qemu-devel@nongnu.org; Thu, 30 Oct 2014 15:35:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjvUn-0005ew-8e for qemu-devel@nongnu.org; Thu, 30 Oct 2014 15:34:57 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9UJYoF6002916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Oct 2014 15:34:51 -0400 Received: from colepc.home.com ([10.3.113.2]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9UJYkFQ015792; Thu, 30 Oct 2014 15:34:49 -0400 From: Cole Robinson To: qemu-devel@nongnu.org Date: Thu, 30 Oct 2014 15:34:35 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: manday@gmx.net, Gerd Hoffmann , Cole Robinson Subject: [Qemu-devel] [PATCH 4/4] 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: crobinso@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 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 --- 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;