@@ -1035,13 +1035,16 @@
# assuming the guest will resize the display to match
# the window size then. Otherwise it defaults to "off".
# Since 3.1
+# @detach-all: Detach all VirtualConsoles when starting Qemu (default: off).
+# Since 6.0
#
# Since: 2.12
#
##
{ 'struct' : 'DisplayGTK',
'data' : { '*grab-on-hover' : 'bool',
- '*zoom-to-fit' : 'bool' } }
+ '*zoom-to-fit' : 'bool',
+ '*detach-all' : 'bool' } }
##
# @DisplayEGLHeadless:
@@ -2189,6 +2189,7 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
GdkDisplay *window_display;
GtkIconTheme *theme;
char *dir;
+ int i;
if (!gtkinit) {
fprintf(stderr, "gtk initialization failed\n");
@@ -2268,6 +2269,12 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
gtk_menu_item_activate(GTK_MENU_ITEM(s->grab_on_hover_item));
}
gd_clipboard_init(s);
+
+ if (opts->u.gtk.detach_all) {
+ for (i = 0; i < s->nb_vcs - 1; i++) {
+ gtk_menu_item_activate(GTK_MENU_ITEM(s->untabify_item));
+ }
+ }
}
static void early_gtk_display_init(DisplayOptions *opts)