From 78c3f40f897f9f11aa7e537ec1fcb62890c3a8cd Mon Sep 17 00:00:00 2001 From: Ivan Konov Date: Fri, 9 Oct 2015 22:52:28 +0300 Subject: [PATCH] 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 --- core-modules/000QubesVm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 1cc8d212..4001c33c 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1678,7 +1678,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