From d0c484784c87d565c39a6ad6236ec9bc2ed71cc0 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 25 Feb 2000 13:30:50 +0000 Subject: [PATCH] (command_loop_1): Call start_busy_cursor before Fcommand_execute and cancel_busy_cursor after it. (timer_check): Remove busy-cursor code. (Fread_key_sequence, Fread_key_sequence_vector): Start/cancel busy cursor timer. --- src/keyboard.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 19f4ef0ea9a..ff94b42677c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1519,18 +1519,18 @@ command_loop_1 () #ifdef HAVE_X_WINDOWS if (display_busy_cursor_p) - { - if (inhibit_busy_cursor != 2) - inhibit_busy_cursor = 0; - if (!inhibit_busy_cursor) - Fx_show_busy_cursor (); - } + start_busy_cursor (); #endif nonundocount = 0; if (NILP (current_kboard->Vprefix_arg)) Fundo_boundary (); Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); + +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif } directly_done: ; current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; @@ -3627,9 +3627,6 @@ timer_check (do_it_now) { int was_locked = single_kboard; int count = specpdl_ptr - specpdl; -#ifdef HAVE_WINDOW_SYSTEM - int old_inhibit_busy_cursor = inhibit_busy_cursor; -#endif /* Mark the timer as triggered to prevent problems if the lisp code fails to reschedule it right. */ @@ -3637,17 +3634,9 @@ timer_check (do_it_now) specbind (Qinhibit_quit, Qt); -#ifdef HAVE_WINDOW_SYSTEM - inhibit_busy_cursor = 2; -#endif - call1 (Qtimer_event_handler, chosen_timer); timers_run++; -#ifdef HAVE_WINDOW_SYSTEM - inhibit_busy_cursor = old_inhibit_busy_cursor; -#endif - unbind_to (count, Qnil); /* Resume allowing input from any kboard, if that was true before. */ @@ -8493,10 +8482,20 @@ DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0, this_single_command_key_start = 0; } +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif + i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + start_busy_cursor (); +#endif + if (i == -1) { Vquit_flag = Qt; @@ -8538,10 +8537,20 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, this_single_command_key_start = 0; } +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + cancel_busy_cursor (); +#endif + i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); +#ifdef HAVE_X_WINDOWS + if (display_busy_cursor_p) + start_busy_cursor (); +#endif + if (i == -1) { Vquit_flag = Qt; -- 2.39.5