diff options
author | wm4 <wm4@nowhere> | 2015-08-01 21:30:16 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-01 21:30:16 +0200 |
commit | 63ade8a49ce8181339e0689b9528969fc475a302 (patch) | |
tree | 028c97e44a3db636b1976651966f6f4996060631 /osdep | |
parent | e0c55cbfea2180f66d9d8570f975e773a5469986 (diff) | |
download | mpv-63ade8a49ce8181339e0689b9528969fc475a302.tar.bz2 mpv-63ade8a49ce8181339e0689b9528969fc475a302.tar.xz |
terminal: disable terminal foreground state polling
This was originally done for zsh; but zsh can manage the terminal state
correctly when foregrounding/backgrounding applications if you enable it
with "ttyctl -f". So I see no reason to wake up the mpv process once
every second anymore.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/terminal-unix.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index 8e417a5214..3c2784bacd 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -391,8 +391,7 @@ static void *terminal_thread(void *ptr) {.events = POLLIN, .fd = death_pipe[0]}, {.events = POLLIN, .fd = STDIN_FILENO}, }; - // Wait with some timeout, so we can call getch2_poll() frequently. - poll(fds, stdin_ok ? 2 : 1, 1000); + poll(fds, stdin_ok ? 2 : 1, -1); if (fds[0].revents) break; if (fds[1].revents) |