@@ -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));
Detaching any addtional guest displays in case there are multiple displays assigned to the guest OS (e.g. max_outputs=n) so that all of them are visible upon lauching. v2: - check if the type of VC is GD_VC_GFX before qemu_console_is_graphic (Gerd Hoffman) - vc[0] is always primary guest display so we won't need n_gfx_vcs (Gerd Hoffmann) - making sure detached window's size same as original surface size (Daniel P. Berrangé) Cc: Daniel P. Berrangé <berrange@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> --- ui/gtk.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)