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': '',
'oldContentAttrib': b'',
'oldApplication': '',
'oldTTY':'-1',
'oldTTY':None,
'newDelta': '',
'newNegativeDelta': '',
'newCursorReview':None,

View File

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