Update ptyDriver.py

This commit is contained in:
chrys 2019-08-20 12:00:39 +02:00 committed by GitHub
parent 1b1d6ac269
commit 181c9bd2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,11 +197,13 @@ class driver(screenDriver):
except (EOFError, OSError): except (EOFError, OSError):
active.value = False active.value = False
break break
# feed and send event bevore write, the pyte already has the right state
# so fenrir already can progress bevore os.write what should give some better reaction time
self.terminal.feed(msgBytes) self.terminal.feed(msgBytes)
os.write(sys.stdout.fileno(), msgBytes)
eventQueue.put({"Type":fenrirEventType.ScreenUpdate, eventQueue.put({"Type":fenrirEventType.ScreenUpdate,
"Data":screen_utils.createScreenEventData(self.terminal.GetScreenContent()) "Data":screen_utils.createScreenEventData(self.terminal.GetScreenContent())
}) })
os.write(sys.stdout.fileno(), msgBytes)
except Exception as e: # Process died? except Exception as e: # Process died?
print(e) print(e)
active.value = False active.value = False