diff options
Diffstat (limited to 'src/keyevents.c')
-rw-r--r-- | src/keyevents.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/keyevents.c b/src/keyevents.c index 0da07d3..0ca489a 100644 --- a/src/keyevents.c +++ b/src/keyevents.c @@ -319,7 +319,7 @@ void feh_event_handle_stdin() char stdin_buf[2]; static char is_esc = 0; KeySym keysym = NoSymbol; - if (read(STDIN_FILENO, &stdin_buf, 1) == -1) { + if (read(STDIN_FILENO, &stdin_buf, 1) <= 0) { control_via_stdin = 0; if (isatty(STDIN_FILENO) && getpgrp() == (tcgetpgrp(STDIN_FILENO))) { weprintf("reading a command from stdin failed - disabling control via stdin"); @@ -710,6 +710,8 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy } else if (feh_is_kp(EVENT_toggle_pause, state, keysym, button)) { slideshow_pause_toggle(winwid); + /* We need to re-render the image to update the info string immediately. */ + winwidget_render_image(winwid, 0, 0); } else if (feh_is_kp(EVENT_save_image, state, keysym, button)) { slideshow_save_image(winwid); |