Merge remote-tracking branch 'qubesos/pr/7'

* qubesos/pr/7:
  Don't send screen layout to the VM if we haven't received it from xrandr because this breaks proper initial screen layout set by gui-agent Fixes QubesOS/qubes-issues#1305 QubesOS/qubes-issues#998
This commit is contained in:
Marek Marczykowski-Górecki 2015-10-11 02:56:25 +02:00
commit 2b7bd1f1f5
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1706,7 +1706,10 @@ class QubesVm(object):
if verbose:
print >> sys.stderr, "--> Sending monitor layout..."
monitor_layout = qubes.monitorlayoutnotify.get_monitor_layout()
qubes.monitorlayoutnotify.notify_vm(self, monitor_layout)
# Notify VM only if we've got a monitor_layout which is not empty
# or else we break proper VM resolution set by gui-agent
if len(monitor_layout) > 0:
qubes.monitorlayoutnotify.notify_vm(self, monitor_layout)
except ImportError as e:
print >>sys.stderr, "ERROR: %s" % e