From: Dongwon Kim <dongwon.kim@intel.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, berrange@redhat.com, kraxel@redhat.com,
pbonzini@redhat.com, f4bug@amsat.org, vivek.kasireddy@intel.com,
Dongwon Kim <dongwon.kim@intel.com>
Subject: [PATCH v5 1/2] ui/gtk: detach VCs for additional guest displays
Date: Mon, 18 Jul 2022 16:30:08 -0700 [thread overview]
Message-ID: <20220718233009.18780-2-dongwon.kim@intel.com> (raw)
In-Reply-To: <20220718233009.18780-1-dongwon.kim@intel.com>
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é <berrange@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
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(-)
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
next prev parent reply other threads:[~2022-07-18 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 23:30 [PATCH v5 0/2] handling guest multiple displays Dongwon Kim
2022-07-18 23:30 ` Dongwon Kim [this message]
2022-07-18 23:30 ` [PATCH v5 2/2] ui/gtk: a new array param monitor to specify the target displays Dongwon Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718233009.18780-2-dongwon.kim@intel.com \
--to=dongwon.kim@intel.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=f4bug@amsat.org \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vivek.kasireddy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).