mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e0c55cbfea
commit
63ade8a49c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue