diff --git a/src/main.cc b/src/main.cc index b70dbdb9..a0485815 100644 --- a/src/main.cc +++ b/src/main.cc @@ -681,13 +681,16 @@ int run_server(StringView session, StringView server_init, { client_manager.redraw_clients(); - // Loop a + // Loop so that eventual inputs happening during the processing are handled as + // well, avoiding unneeded redraws. bool allow_blocking = not client_manager.has_pending_inputs(); while (event_manager.handle_next_events(EventMode::Normal, nullptr, allow_blocking)) { client_manager.process_pending_inputs(); allow_blocking = false; } + client_manager.process_pending_inputs(); + client_manager.clear_client_trash(); client_manager.clear_window_trash(); buffer_manager.clear_buffer_trash();