From 56e19eacb9741c4564f7e61f0c468aeeda6622d3 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 16 Jan 2017 23:09:05 +0100 Subject: [PATCH] load ignore screen again --- src/fenrir/core/screenManager.py | 7 ++++--- src/fenrir/fenrir.py | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fenrir/core/screenManager.py b/src/fenrir/core/screenManager.py index 1da02598..4147775e 100644 --- a/src/fenrir/core/screenManager.py +++ b/src/fenrir/core/screenManager.py @@ -16,7 +16,7 @@ class screenManager(): self.env['runtime']['settingsManager'].loadDriver(\ self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver') if self.env['runtime']['settingsManager'].getSettingAsBool('screen', 'autodetectSuspendingScreen'): - self.autoIgnoreScreens = self.env['runtime']['screenDriver'].getIgnoreScreens() + self.updateAutoIgnoreScreens() def shutdown(self): self.env['runtime']['settingsManager'].shutdownDriver('screenDriver') @@ -25,7 +25,7 @@ class screenManager(): self.env['runtime']['screenDriver'].getCurrScreen() self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication'] if self.isScreenChange(): - self.autoIgnoreScreens = self.env['runtime']['screenDriver'].getIgnoreScreens() + self.updateAutoIgnoreScreens() self.changeBrailleScreen() if not self.isSuspendingScreen(self.env['screenData']['newTTY']): self.env['runtime']['screenDriver'].update(trigger) @@ -40,7 +40,8 @@ class screenManager(): return ((screen in \ self.env['runtime']['settingsManager'].getSetting('screen', 'suspendingScreen').split(',')) or (screen in self.autoIgnoreScreens)) - + def updateAutoIgnoreScreens(self): + self.autoIgnoreScreens = self.env['runtime']['screenDriver'].getIgnoreScreens() def isScreenChange(self): if not self.env['screenData']['oldTTY']: return False diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index 5be90d92..0d3af5d1 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -57,7 +57,8 @@ class fenrir(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange') self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \ self.environment['runtime']['applicationManager'].getPrevApplication(), \ - self.environment['runtime']['applicationManager'].getCurrentApplication()) + self.environment['runtime']['applicationManager'].getCurrentApplication()) + self.environment['runtime']['screenManager'].updateAutoIgnoreScreens() if self.environment['runtime']['screenManager'].isScreenChange(): self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged')