about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2021-05-29 11:47:04 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2021-05-29 11:47:04 +0200
commit8a847a901ed8e0ee667a042a74282efc97e0da01 (patch)
treefefb234d2f0e23407b40c90b2635348953099cdf
parentb6db98ffd7b1d9aee64b8c5fa52dafc332aacfd1 (diff)
terminal: Reduce priority of PTY Source
With the default priority, the rendering thread would starve if the PTY
already has input ready. For example, when executing yes(1).
-rw-r--r--saneterm/terminal.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/saneterm/terminal.py b/saneterm/terminal.py
index 7ff85ac..2285883 100644
--- a/saneterm/terminal.py
+++ b/saneterm/terminal.py
@@ -68,6 +68,7 @@ class Terminal(Gtk.Window):
         self.reset_history_index()
 
         self.pty = PtySource(cmd)
+        self.pty.set_priority(GLib.PRIORITY_LOW)
         self.pty.set_callback(self.handle_pty)
         self.pty.attach(None)