From ab469e44734c64b34abaf4fe63dfe0ac817b7c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 9 Feb 2016 00:26:03 +0100 Subject: [PATCH] vm: fix calling monitor layout notifier --- qubes/vm/qubesvm.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 0347b188..d1e10abf 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1030,15 +1030,19 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): # TODO event, extension def notify_monitor_layout(self): - monitor_layout = qubes.monitor_layout.get_monitor_layout() + try: + import qubes.monitorlayoutnotify + monitor_layout = qubes.monitorlayoutnotify.get_monitor_layout() - # notify qube only if we've got a non-empty monitor_layout or else we - # break proper qube resolution set by gui-agent - if not monitor_layout: - return + # notify qube only if we've got a non-empty monitor_layout or else we + # break proper qube resolution set by gui-agent + if not monitor_layout: + return - self.log.info('Sending monitor layout') - qubes.monitor_layout.notify_vm(self, monitor_layout) + self.log.info('Sending monitor layout') + qubes.monitorlayoutnotify.notify_vm(self, monitor_layout) + except ImportError: + self.log.warning('Monitor layout notify module not installed') # TODO move to storage