From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Anthony Liguori <aliguori@amazon.com>,
Cole Robinson <crobinso@redhat.com>
Subject: [Qemu-devel] [PULL 4/5] gtk: Hide the menubar when in fullscreen mode (lp 1294898)
Date: Tue, 4 Nov 2014 11:41:10 +0100 [thread overview]
Message-ID: <1415097671-15343-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1415097671-15343-1-git-send-email-kraxel@redhat.com>
From: Cole Robinson <crobinso@redhat.com>
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 <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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;
--
1.8.3.1
next prev parent reply other threads:[~2014-11-04 10:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 10:41 [Qemu-devel] [PULL 0/5] gtk: fix fullscreen with gtk3, fix build with older gtk2 versions Gerd Hoffmann
2014-11-04 10:41 ` [Qemu-devel] [PULL 1/5] gtk: Grab accel_group from GtkDisplayState Gerd Hoffmann
2014-11-04 10:41 ` [Qemu-devel] [PULL 2/5] gtk: Install fullscreen accelerator on toplevel window Gerd Hoffmann
2014-11-04 10:41 ` [Qemu-devel] [PULL 3/5] gtk: Install vc accelerators on parent window Gerd Hoffmann
2014-11-04 10:41 ` Gerd Hoffmann [this message]
2014-11-04 10:41 ` [Qemu-devel] [PULL 5/5] gtk: add GDK_KEY_pause #define Gerd Hoffmann
2014-11-04 11:51 ` Cornelia Huck
2014-11-04 13:39 ` Alexander Graf
2014-11-04 12:57 ` [Qemu-devel] [PULL 0/5] gtk: fix fullscreen with gtk3, fix build with older gtk2 versions Peter Maydell
2014-11-04 13:38 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415097671-15343-5-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=crobinso@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).