ignore screenChange on fenrir start

This commit is contained in:
chrys 2016-10-08 15:08:53 +02:00
parent 3212d1da26
commit adec95c8c2
2 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,7 @@ screenData = {
'oldContentText': '', 'oldContentText': '',
'oldContentAttrib': b'', 'oldContentAttrib': b'',
'oldApplication': '', 'oldApplication': '',
'oldTTY':'-1', 'oldTTY':None,
'newDelta': '', 'newDelta': '',
'newNegativeDelta': '', 'newNegativeDelta': '',
'newCursorReview':None, 'newCursorReview':None,

View File

@ -41,6 +41,8 @@ class screenManager():
(screen in self.autoIgnoreScreens)) (screen in self.autoIgnoreScreens))
def isScreenChange(self): def isScreenChange(self):
if not self.env['screenData']['oldTTY']:
return False
return self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY'] return self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']
def getWindowAreaInText(self, text): def getWindowAreaInText(self, text):
@ -57,13 +59,14 @@ class screenManager():
def changeBrailleScreen(self): def changeBrailleScreen(self):
if not self.env['runtime']['brailleDriver']: if not self.env['runtime']['brailleDriver']:
return return
if self.env['screenData']['oldTTY']:
if not self.isSuspendingScreen(self.env['screenData']['oldTTY']): if not self.isSuspendingScreen(self.env['screenData']['oldTTY']):
try: try:
self.env['runtime']['brailleDriver'].leveScreen() self.env['runtime']['brailleDriver'].leveScreen()
except Exception as e: except Exception as e:
print(e) pass
if not self.isSuspendingScreen(): if not self.isSuspendingScreen():
try: try:
self.env['runtime']['brailleDriver'].enterScreen(self.env['screenData']['newTTY']) self.env['runtime']['brailleDriver'].enterScreen(self.env['screenData']['newTTY'])
except Exception as e: except Exception as e:
print(e) pass