prioriy to input
This commit is contained in:
parent
bb6fc4d3ab
commit
4847b1c78b
@ -130,7 +130,22 @@ class driver(screenDriver):
|
||||
if self.signalPipe[0] in r:
|
||||
os.read(self.signalPipe[0], 1)
|
||||
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
|
||||
if self.p_out in r:
|
||||
if debug:
|
||||
@ -150,22 +165,7 @@ class driver(screenDriver):
|
||||
"Data":screen_utils.createScreenEventData(terminal.dump())
|
||||
})
|
||||
if debug:
|
||||
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')
|
||||
print('after p_out')
|
||||
except Exception as e: # Process died?
|
||||
print(e)
|
||||
active.value = False
|
||||
|
Loading…
Reference in New Issue
Block a user