fix window mode

This commit is contained in:
chrys
2016-10-03 01:34:46 +02:00
parent 772ea79128
commit d4b86d38f2
5 changed files with 16 additions and 13 deletions

View File

@ -57,9 +57,11 @@ class cursorManager():
def isApplicationWindowSet(self):
try:
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
return self.env['commandBuffer']['windowArea'][currApp]['1'] != None
if self.env['commandBuffer']['windowArea'][currApp]['1'] != None:
return True
except:
return False
pass
return False
def setWindowForApplication(self):
if not self.env['commandBuffer']['Marks']['1']:
return False

View File

@ -43,8 +43,10 @@ class screenManager():
return text
windowText = ''
windowList = text.split('\n')
windowList = windowList[self.env['commandBuffer']['windowArea'][self.env['screenData']['newApplication']]['1']['y']:self.env['commandBuffer']['windowArea'][currApp]['2']['y'] + 1]
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
windowList = windowList[self.env['commandBuffer']['windowArea'][currApp]['1']['y']:self.env['commandBuffer']['windowArea'][currApp]['2']['y'] + 1]
for line in windowList:
windowText += line[self.env['commandBuffer']['windowArea'][self.env['screenData']['newApplication']]['1']['x']:self.env['commandBuffer']['windowArea'][currApp]['2']['x'] + 1] + '\n'
windowText += line[self.env['commandBuffer']['windowArea'][currApp]['1']['x']:self.env['commandBuffer']['windowArea'][currApp]['2']['x'] + 1] + '\n'
print(windowText)
return windowText

View File

@ -64,8 +64,7 @@ class fenrir():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate')
self.handleCommands()
#print(time.time()-startTime)
self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication']
#print(time.time()-startTime)
def prepareCommand(self):
if self.environment['runtime']['screenManager'].isSuspendingScreen():