[virt-tools-list] [PATCH virt-viewer v7 2/3] app: Do not map display to non-existent monitor
Pavel Grunt
pgrunt at redhat.com
Tue Oct 20 13:13:06 UTC 2015
---
v7: - new patch to simplify PATCH 3/3
---
src/virt-viewer-app.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
index 568f062..fcf7dd3 100644
--- a/src/virt-viewer-app.c
+++ b/src/virt-viewer-app.c
@@ -350,6 +350,10 @@ gint virt_viewer_app_get_initial_monitor_for_display(VirtViewerApp* self, gint d
monitor = -1;
}
}
+ if (monitor >= get_n_client_monitors()) {
+ g_debug("monitor for display %d does not exist", display);
+ monitor = -1;
+ }
return monitor;
}
@@ -359,7 +363,7 @@ app_window_try_fullscreen(VirtViewerApp *self G_GNUC_UNUSED,
VirtViewerWindow *win, gint nth)
{
gint monitor = virt_viewer_app_get_initial_monitor_for_display(self, nth);
- if (monitor == -1 || monitor >= get_n_client_monitors()) {
+ if (monitor == -1) {
g_debug("skipping fullscreen for display %d", nth);
return;
}
--
2.5.0
More information about the virt-tools-list
mailing list