aboutsummaryrefslogtreecommitdiff
path: root/src/imv.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2019-07-12 22:19:28 +0100
committerHarry Jeffery <harry@exec64.co.uk>2019-07-12 22:19:28 +0100
commit88f7be23b0d3d6e69ad8d99f22c567c022564e18 (patch)
treee2f9f61a9966e20153114321eef282aad2835578 /src/imv.c
parentd4bb4bd6437fa4222e5de38671d1fe9b5dc5c716 (diff)
downloadimv-88f7be23b0d3d6e69ad8d99f22c567c022564e18.tar.gz
Fix event loop hanging
Diffstat (limited to 'src/imv.c')
-rw-r--r--src/imv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/imv.c b/src/imv.c
index b81d9a8..299dddb 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -896,13 +896,6 @@ int imv_run(struct imv *imv)
while (!imv->quit) {
- imv_window_pump_events(imv->window, event_handler, imv);
-
- /* if we're quitting, don't bother drawing any more images */
- if (imv->quit) {
- break;
- }
-
/* Check if navigator wrapped around paths lists */
if (!imv->loop_input && imv_navigator_wrapped(imv->navigator)) {
break;
@@ -1069,6 +1062,9 @@ int imv_run(struct imv *imv)
/* Go to sleep until an input/internal event or the timeout expires */
imv_window_wait_for_event(imv->window, timeout);
+
+ /* Handle the new events that have arrived */
+ imv_window_pump_events(imv->window, event_handler, imv);
}
if (imv->list_files_at_exit) {