summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-05-06 10:20:53 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-05-26 08:41:04 +0200
commitaa0a55d42d0874bad9ff0f709c91179be727b8ce (patch)
tree9104da30ecc47e9deb17b4a0dfda29906d8c2fce /ui
parent0c77a37f1118fabed18b9e1aa04ddedf4c06d3d5 (diff)
downloadqemu-aa0a55d42d0874bad9ff0f709c91179be727b8ce.tar.gz
gtk: enable untabify for gfx
Now we have all grab fixes in place, so we can allow detaching graphic display tabs too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 298419b59d..79dc8dba9f 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -338,7 +338,11 @@ static void gd_update_windowsize(VirtualConsole *vc)
gtk_widget_set_size_request(vc->gfx.drawing_area,
surface_width(vc->gfx.ds) * sx,
surface_height(vc->gfx.ds) * sy);
- gtk_window_resize(GTK_WINDOW(s->window), 320, 240);
+ if (vc->window) {
+ gtk_window_resize(GTK_WINDOW(vc->window), 320, 240);
+ } else {
+ gtk_window_resize(GTK_WINDOW(s->window), 320, 240);
+ }
}
static void gd_update_full_redraw(VirtualConsole *vc)
@@ -962,8 +966,8 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
VirtualConsole *vc = gd_vc_find_current(s);
if (vc->type == GD_VC_GFX) {
- /* temporary: needs more work to get grabs etc correct */
- return;
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item),
+ FALSE);
}
if (!vc->window) {
gtk_widget_set_sensitive(vc->menu_item, false);