prioriy to input

This commit is contained in:
chrys 2018-03-26 13:22:29 +02:00
parent bb6fc4d3ab
commit 4847b1c78b

View File

@ -131,6 +131,21 @@ class driver(screenDriver):
os.read(self.signalPipe[0], 1) os.read(self.signalPipe[0], 1)
lines, columns = self.resizeTerminal(self.p_out) lines, columns = self.resizeTerminal(self.p_out)
terminal.resize(lines, columns) terminal.resize(lines, columns)
# input
if sys.stdin in r:
if debug:
print('pre stdin')
try:
msgBytes = self.readAll(sys.stdin.fileno())
eventQueue.put({"Type":fenrirEventType.ByteInput,
"Data":msgBytes
})
except (EOFError, OSError):
active.value = False
break
#self.injectTextToScreen(msgBytes)
if debug:
print('after stdin')
# output # output
if self.p_out in r: if self.p_out in r:
if debug: if debug:
@ -151,21 +166,6 @@ class driver(screenDriver):
}) })
if debug: if debug:
print('after p_out') print('after p_out')
# input
if sys.stdin in r:
if debug:
print('pre stdin')
try:
msgBytes = self.readAll(sys.stdin.fileno())
eventQueue.put({"Type":fenrirEventType.ByteInput,
"Data":msgBytes
})
except (EOFError, OSError):
active.value = False
break
#self.injectTextToScreen(msgBytes)
if debug:
print('after stdin')
except Exception as e: # Process died? except Exception as e: # Process died?
print(e) print(e)
active.value = False active.value = False