From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whe8U-00060x-Bi for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Whe8M-0001X0-KG for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whe8M-0001WV-DY for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:06 -0400 From: Gerd Hoffmann Date: Tue, 6 May 2014 14:05:38 +0200 Message-Id: <1399377958-20076-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1399377958-20076-1-git-send-email-kraxel@redhat.com> References: <1399377958-20076-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 02/22] gtk: zap vte size requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori The vte tabs simply get the size of the vga tab then, with whatever cols and lines are fitting in. I find this bahavior more useful than resizing the qemu window all day long. YMMV. Comments are welcome. Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index f6f3677..776e72d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1058,19 +1058,12 @@ static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2, gpointer data) { GtkDisplayState *s = data; - guint last_page; gboolean on_vga; if (!gtk_widget_get_realized(s->notebook)) { return; } - last_page = gtk_notebook_get_current_page(nb); - - if (last_page) { - gtk_widget_set_size_request(s->vc[last_page - 1].terminal, -1, -1); - } - on_vga = arg2 == 0; if (!on_vga) { @@ -1086,14 +1079,7 @@ static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2, } else { #if defined(CONFIG_VTE) VirtualConsole *vc = &s->vc[arg2 - 1]; - VteTerminal *term = VTE_TERMINAL(vc->terminal); - int width, height; - - width = 80 * vte_terminal_get_char_width(term); - height = 25 * vte_terminal_get_char_height(term); - gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(vc->menu_item), TRUE); - gtk_widget_set_size_request(vc->terminal, width, height); #else g_assert_not_reached(); #endif -- 1.8.3.1