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.
This commit is contained in:
Marc-André Lureau 2011-04-26 16:51:20 +02:00 committed by Cole Robinson
parent a8f77da827
commit 615740e9c4

View File

@ -445,6 +445,11 @@ class SpiceViewer(Viewer):
if type(channel) == spice.DisplayChannel:
channel_id = channel.get_property("channel-id")
if channel_id != 0:
logging.debug("Spice 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)