From 17be6e1990a92e9b43f5f49cca9c4dd3da24a1e8 Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 15 Dec 2023 17:02:18 +0100 Subject: terminal-unix: enable the cursor after ctrl+z 24270b8587 disabled the cursor while mpv is running, but if you send mpv to the background, it is not re-enabled until you run bg, and not even after that if mpv is paused. Fix this by enabling the cursor from the SIGTSTP handler. --- osdep/terminal-unix.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'osdep') diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index d5b8fe36b1..b777104d6b 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -358,6 +358,8 @@ static void stop_sighandler(int signum) { int saved_errno = errno; (void)write(stop_cont_pipe[1], &(char){PIPE_STOP}, 1); + (void)write(STDERR_FILENO, TERM_ESC_RESTORE_CURSOR, + sizeof(TERM_ESC_RESTORE_CURSOR) - 1); errno = saved_errno; // note: for this signal, we use SA_RESETHAND but do NOT mask signals -- cgit v1.2.3