[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH virt-viewer 4/4] 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 89f7e0d..71dc8f9 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -693,7 +693,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);
-- 
1.8.3.rc1.49.g8d97506


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]