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

@ -26,10 +26,10 @@ KEY_FENRIR,KEY_KPDOT=exit_review
#KEY_FENRIR,KEY_KP5=curr_screen
KEY_FENRIR,KEY_KP8=curr_screen_before_cursor
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
#KEY_FENRIR,KEY_1=set_window_application
#KEY_FENRIR,KEY_3=clear_window_application
KEY_FENRIR,KEY_3=clear_bookmark_1
KEY_FENRIR,KEY_1=set_bookmark_1
KEY_FENRIR,KEY_1=set_window_application
KEY_FENRIR,KEY_3=clear_window_application
#KEY_FENRIR,KEY_3=clear_bookmark_1
#KEY_FENRIR,KEY_1=set_bookmark_1
KEY_FENRIR,KEY_2=bookmark_1
KEY_KPPLUS=last_incoming
KEY_FENRIR,KEY_F2=toggle_braille

View File

@ -57,7 +57,7 @@ module=espeak
voice=
# Select the language you want fenrir to use.
language=de
language=english-us
# Read new text as it happens?
autoReadIncoming=True
@ -82,7 +82,7 @@ device=AUTO
grabDevices=True
ignoreShortcuts=False
# the current shortcut layout located in /etc/fenrir/keyboard
keyboardLayout=test
keyboardLayout=desktop
# echo chars while typing.
charEcho=False
# echo deleted chars
@ -95,7 +95,7 @@ interruptOnKeyPress=False
doubleTapDelay=0.2
[general]
debugLevel=0
debugLevel=3
punctuationLevel=Some
numberOfClipboards=10
# define the current fenrir key

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

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