Detaching any addtional guest displays in case multiple displays are assigned to the guest OS (e.g. max_outputs=n) so that all of them are visible upon lauching.
Cc: Daniel P. Berrangé <berra...@redhat.com> Cc: Markus Armbruster <arm...@redhat.com> Cc: Philippe Mathieu-Daudé <f4...@amsat.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Gerd Hoffmann <kra...@redhat.com> Cc: Vivek Kasireddy <vivek.kasire...@intel.com> Signed-off-by: Dongwon Kim <dongwon....@intel.com> --- ui/gtk.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 2a791dd2aa..e6878c3209 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1361,6 +1361,11 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque) g_signal_connect(vc->window, "delete-event", G_CALLBACK(gd_tab_window_close), vc); + + gtk_window_set_default_size(GTK_WINDOW(vc->window), + surface_width(vc->gfx.ds), + surface_height(vc->gfx.ds)); + gtk_widget_show_all(vc->window); if (qemu_console_is_graphic(vc->gfx.dcl.con)) { @@ -2311,6 +2316,7 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) GtkDisplayState *s = g_malloc0(sizeof(*s)); GdkDisplay *window_display; GtkIconTheme *theme; + int i; char *dir; if (!gtkinit) { @@ -2381,7 +2387,12 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts) gtk_widget_set_sensitive(s->copy_item, vc && vc->type == GD_VC_VTE); #endif - + for (i = 1; i < s->nb_vcs; i++) { + if (vc->type == GD_VC_GFX && + qemu_console_is_graphic(s->vc[i].gfx.dcl.con)) { + gtk_menu_item_activate(GTK_MENU_ITEM(s->untabify_item)); + } + } if (opts->has_full_screen && opts->full_screen) { gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item)); -- 2.20.1