summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/degesch.c b/degesch.c
index b7adad7..4831a3b 100644
--- a/degesch.c
+++ b/degesch.c
@@ -3989,8 +3989,8 @@ initiate_quit (struct app_context *ctx)
{
log_global_status (ctx, "Shutting down");
- // Destroy the user interface
- input_stop (&ctx->input);
+ // Hide the user interface
+ input_hide (&ctx->input);
// Initiate a connection close
struct str_map_iter iter;
@@ -11569,9 +11569,7 @@ on_tty_readable (const struct pollfd *fd, struct app_context *ctx)
process_mirc_escape (fd, ctx);
else if (ctx->in_bracketed_paste)
process_bracketed_paste (fd, ctx);
- else if (ctx->input.active)
- // XXX: this may loop for a bit: stop the event or eat the input?
- // (This prevents a segfault when the input has been stopped.)
+ else if (!ctx->quitting)
input_on_readable (&ctx->input);
// User activity detected, stop current auto-away and start anew;
@@ -11866,6 +11864,8 @@ main (int argc, char *argv[])
while (ctx.polling)
poller_run (&ctx.poller);
+ input_stop (&ctx.input);
+
if (get_config_boolean (ctx.config.root, "behaviour.save_on_quit"))
save_configuration (&ctx);