This commit is contained in:
chrys 2017-01-16 23:12:27 +01:00
parent 56e19eacb9
commit 15d3fffeac
2 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,7 @@ class screenManager():
self.env = environment
self.env['runtime']['settingsManager'].loadDriver(\
self.env['runtime']['settingsManager'].getSetting('screen', 'driver'), 'screenDriver')
if self.env['runtime']['settingsManager'].getSettingAsBool('screen', 'autodetectSuspendingScreen'):
self.updateAutoIgnoreScreens()
self.updateAutoIgnoreScreens()
def shutdown(self):
self.env['runtime']['settingsManager'].shutdownDriver('screenDriver')
@ -41,7 +40,8 @@ class screenManager():
self.env['runtime']['settingsManager'].getSetting('screen', 'suspendingScreen').split(',')) or
(screen in self.autoIgnoreScreens))
def updateAutoIgnoreScreens(self):
self.autoIgnoreScreens = self.env['runtime']['screenDriver'].getIgnoreScreens()
if self.env['runtime']['settingsManager'].getSettingAsBool('screen', 'autodetectSuspendingScreen'):
self.autoIgnoreScreens = self.env['runtime']['screenDriver'].getIgnoreScreens()
def isScreenChange(self):
if not self.env['screenData']['oldTTY']:
return False

View File

@ -58,7 +58,7 @@ class fenrir():
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
self.environment['runtime']['applicationManager'].getPrevApplication(), \
self.environment['runtime']['applicationManager'].getCurrentApplication())
self.environment['runtime']['screenManager'].updateAutoIgnoreScreens()
self.environment['runtime']['screenManager'].updateAutoIgnoreScreens()
if self.environment['runtime']['screenManager'].isScreenChange():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged')