make X autodetect working, cleanups, remove unecressary returns, shotdown of the drivers in the managers

This commit is contained in:
chrys
2016-09-17 01:04:03 +02:00
parent 52fbef639c
commit 7d7c021774
12 changed files with 93 additions and 225 deletions

View File

@@ -7,14 +7,19 @@ class screenManager():
self.autoIgnoreScreens = []
def initialize(self, environment):
environment['runtime']['settingsManager'].loadDriver(environment,\
environment['runtime']['settingsManager'].getSetting(environment,'screen', 'driver'), 'screenDriver')
if environment['runtime']['settingsManager'].getSettingAsBool(environment,'screen', 'autodetectSuspendingScreen'):
self.autoIgnoreScreens = environment['runtime']['screenDriver'].getIgnoreScreens()
return environment
def shutdown(self, environment):
if environment['runtime']['screenDriver']:
environment['runtime']['screenDriver'].shutdown(environment)
return environment
def update(self, environment):
print(self.isSuspendingScreen(environment))
if not self.isSuspendingScreen(environment):
environment = environment['runtime']['screenDriver'].update(environment)
environment['screenData']['lastScreenUpdate'] = time.time()