move some commands to onScreenUpdate (WIP)

This commit is contained in:
chrys
2017-06-30 19:37:50 +02:00
parent 16f4e3e981
commit 98ce582b15
13 changed files with 9 additions and 589 deletions

View File

@@ -63,33 +63,31 @@ class fenrirManager():
self.environment['runtime']['inputManager'].clearEventBuffer()
if self.environment['input']['keyForeward'] > 0:
self.environment['input']['keyForeward'] -=1
self.environment['runtime']['screenManager'].update('onInput')
#self.environment['runtime']['screenManager'].update('onInput')
self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
self.handleCommands()
def handleScreenChange(self):
self.environment['runtime']['screenManager'].update('onScreenChange')
'''
if self.environment['runtime']['applicationManager'].isApplicationChange():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange')
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
self.environment['runtime']['applicationManager'].getPrevApplication(), \
self.environment['runtime']['applicationManager'].getCurrentApplication())
if not self.environment['runtime']['screenManager'].isScreenChange():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged')
'''
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged')
def handleScreenUpdate(self):
s = time.time()
self.environment['runtime']['screenManager'].update('onUpdate')
'''
if self.environment['runtime']['applicationManager'].isApplicationChange():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange')
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
self.environment['runtime']['applicationManager'].getPrevApplication(), \
self.environment['runtime']['applicationManager'].getCurrentApplication())
#if not self.environment['runtime']['screenManager'].isScreenChange():
'''
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate')
#print(time.time() -s)
def handlePlugInputDevice(self):

View File

@@ -21,9 +21,8 @@ class screenManager():
self.env['runtime']['settingsManager'].shutdownDriver('screenDriver')
def update(self, trigger='onUpdate'):
self.env['runtime']['screenDriver'].getCurrScreen()
if trigger == 'onScreenChange':
self.env['runtime']['screenDriver'].getCurrScreen()
self.env['runtime']['screenDriver'].getSessionInformation()
self.env['screen']['oldApplication'] = self.env['screen']['newApplication']
if self.isScreenChange():