summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorgiladogit <32686842+giladogit@users.noreply.github.com>2018-07-06 17:21:03 -0700
committerGitHub <noreply@github.com>2018-07-06 17:21:03 -0700
commit6bc51aa57a2898817aeb92e616f221adf6881ab1 (patch)
tree80f284586b0d3581313c69cc704155ebb92d8bf2 /src/main.c
parent9bde3a460a24ae63fcd7bf68612ba0fc683786c6 (diff)
Update main.c
See issue #405
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index f1fca24..99397fd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -87,7 +87,7 @@ int main(int argc, char **argv)
/* main event loop */
while (feh_main_iteration(1));
- return(0);
+ return(sig_exit);
}
/* Return 0 to stop iterating, 1 if ok to continue. */
@@ -104,7 +104,7 @@ int feh_main_iteration(int block)
double t1 = 0.0, t2 = 0.0;
fehtimer ft;
- if (window_num == 0)
+ if (window_num == 0 || sig_exit != 0)
return(0);
if (first) {
@@ -137,7 +137,7 @@ int feh_main_iteration(int block)
if (ev_handler[ev.type])
(*(ev_handler[ev.type])) (&ev);
- if (window_num == 0)
+ if (window_num == 0 || sig_exit != 0)
return(0);
}
XFlush(disp);
@@ -208,7 +208,7 @@ int feh_main_iteration(int block)
feh_event_handle_stdin();
}
}
- if (window_num == 0)
+ if (window_num == 0 || sig_exit != 0)
return(0);
return(1);