From e46a4d6759ee7a995abc158e1583ca40f5768e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 18 Jul 2013 20:16:46 +0200 Subject: [PATCH] Hide extra monitors that don't fit in auto-conf Virt-viewer sometimes opens one too many windows if the guest is configured with more monitors than the client (the spice monitor configuration request and the current config aren't related, so there is some race). Instead, let's hide extra monitors that wouldn't fit in auto-conf. https://bugzilla.redhat.com/show_bug.cgi?id=985898 --- src/virt-viewer-app.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index 649658c..cd47f8c 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -685,7 +685,10 @@ display_show_hint(VirtViewerDisplay *display, "show-hint", &hint, NULL); - if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) { + if (self->priv->fullscreen_auto_conf && + nth >= gdk_screen_get_n_monitors(gdk_screen_get_default())) { + virt_viewer_window_hide(win); + } else if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) { virt_viewer_window_hide(win); } else if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY) { virt_viewer_notebook_show_display(nb);