diff options
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index e36c85827..aed649b27 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -5845,8 +5845,11 @@ gui_mch_wait_for_chars(long wtime) /* * Loop in GTK+ processing until a timeout or input occurs. + * Skip this if input is available anyway (can happen in rare + * situations, sort of race condition). */ - gtk_main(); + if (!input_available()) + gtk_main(); /* Got char, return immediately */ if (input_available()) |