From 8a847a901ed8e0ee667a042a74282efc97e0da01 Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Sat, 29 May 2021 11:47:04 +0200 Subject: 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). --- saneterm/terminal.py | 1 + 1 file changed, 1 insertion(+) (limited to 'saneterm') 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) -- cgit 1.4.1