From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Cole Robinson Date: Thu, 30 Oct 2014 15:34:35 -0400 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 4/4] gtk: Hide the menubar when in fullscreen mode (lp 1294898) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: manday@gmx.net, Gerd Hoffmann , 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 --- 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; -- 2.1.0