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

[virt-tools-list] [PATCH 1/2] console/spice: in multi-head cases, it should display first channel



Currently, it may pick up second display first. This patch makes sure
to display the primary display.
---
 src/virtManager/console.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/virtManager/console.py b/src/virtManager/console.py
index 752e5e3..0687b83 100644
--- a/src/virtManager/console.py
+++ b/src/virtManager/console.py
@@ -442,6 +442,11 @@ class SpiceViewer(Viewer):
 
         if type(channel) == spice.DisplayChannel:
             channel_id = channel.get_property("channel-id")
+
+            if channel_id != 0:
+                logging.debug("Multi-head unsupported")
+                return
+
             self.display_channel = channel
             self.display = spice.Display(self.spice_session, channel_id)
             self.console.window.get_widget("console-vnc-viewport").add(self.display)
@@ -1063,6 +1068,8 @@ class vmmConsolePages(vmmGObjectUI):
         align_ratio = float(req.width) / float(req.height)
 
         desktop_w, desktop_h = self.viewer.get_desktop_resolution()
+        if desktop_h == 0:
+            return
         desktop_ratio = float(desktop_w) / float(desktop_h)
 
         if not is_scale:
-- 
1.7.4


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