Commit d0c48478 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(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.
parent e12da451
...@@ -1519,18 +1519,18 @@ command_loop_1 () ...@@ -1519,18 +1519,18 @@ command_loop_1 ()
#ifdef HAVE_X_WINDOWS #ifdef HAVE_X_WINDOWS
if (display_busy_cursor_p) if (display_busy_cursor_p)
{ start_busy_cursor ();
if (inhibit_busy_cursor != 2)
inhibit_busy_cursor = 0;
if (!inhibit_busy_cursor)
Fx_show_busy_cursor ();
}
#endif #endif
nonundocount = 0; nonundocount = 0;
if (NILP (current_kboard->Vprefix_arg)) if (NILP (current_kboard->Vprefix_arg))
Fundo_boundary (); Fundo_boundary ();
Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
#ifdef HAVE_X_WINDOWS
if (display_busy_cursor_p)
cancel_busy_cursor ();
#endif
} }
directly_done: ; directly_done: ;
current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg;
...@@ -3627,9 +3627,6 @@ timer_check (do_it_now) ...@@ -3627,9 +3627,6 @@ timer_check (do_it_now)
{ {
int was_locked = single_kboard; int was_locked = single_kboard;
int count = specpdl_ptr - specpdl; 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 /* Mark the timer as triggered to prevent problems if the lisp
code fails to reschedule it right. */ code fails to reschedule it right. */
...@@ -3637,17 +3634,9 @@ timer_check (do_it_now) ...@@ -3637,17 +3634,9 @@ timer_check (do_it_now)
specbind (Qinhibit_quit, Qt); specbind (Qinhibit_quit, Qt);
#ifdef HAVE_WINDOW_SYSTEM
inhibit_busy_cursor = 2;
#endif
call1 (Qtimer_event_handler, chosen_timer); call1 (Qtimer_event_handler, chosen_timer);
timers_run++; timers_run++;
#ifdef HAVE_WINDOW_SYSTEM
inhibit_busy_cursor = old_inhibit_busy_cursor;
#endif
unbind_to (count, Qnil); unbind_to (count, Qnil);
/* Resume allowing input from any kboard, if that was true before. */ /* 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, ...@@ -8493,10 +8482,20 @@ DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 5, 0,
this_single_command_key_start = 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])), i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])),
prompt, ! NILP (dont_downcase_last), prompt, ! NILP (dont_downcase_last),
! NILP (can_return_switch_frame), 0); ! NILP (can_return_switch_frame), 0);
#ifdef HAVE_X_WINDOWS
if (display_busy_cursor_p)
start_busy_cursor ();
#endif
if (i == -1) if (i == -1)
{ {
Vquit_flag = Qt; Vquit_flag = Qt;
...@@ -8538,10 +8537,20 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, ...@@ -8538,10 +8537,20 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector,
this_single_command_key_start = 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])), i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])),
prompt, ! NILP (dont_downcase_last), prompt, ! NILP (dont_downcase_last),
! NILP (can_return_switch_frame), 0); ! NILP (can_return_switch_frame), 0);
#ifdef HAVE_X_WINDOWS
if (display_busy_cursor_p)
start_busy_cursor ();
#endif
if (i == -1) if (i == -1)
{ {
Vquit_flag = Qt; Vquit_flag = Qt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment