diff options
| author | Gerd Moellmann | 2000-02-25 13:30:50 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-02-25 13:30:50 +0000 |
| commit | d0c484784c87d565c39a6ad6236ec9bc2ed71cc0 (patch) | |
| tree | a4f560c915f42a27b4cb44ca221e549631e2e80a | |
| parent | e12da451f5c1d449d4c33dcc9353a20ee228fe7f (diff) | |
| download | emacs-d0c484784c87d565c39a6ad6236ec9bc2ed71cc0.tar.gz emacs-d0c484784c87d565c39a6ad6236ec9bc2ed71cc0.zip | |
(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.
| -rw-r--r-- | src/keyboard.c | 43 |
1 files 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 () | |||
| 1519 | 1519 | ||
| 1520 | #ifdef HAVE_X_WINDOWS | 1520 | #ifdef HAVE_X_WINDOWS |
| 1521 | if (display_busy_cursor_p) | 1521 | if (display_busy_cursor_p) |
| 1522 | { | 1522 | start_busy_cursor (); |
| 1523 | if (inhibit_busy_cursor != 2) | ||
| 1524 | inhibit_busy_cursor = 0; | ||
| 1525 | if (!inhibit_busy_cursor) | ||
| 1526 | Fx_show_busy_cursor (); | ||
| 1527 | } | ||
| 1528 | #endif | 1523 | #endif |
| 1529 | 1524 | ||
| 1530 | nonundocount = 0; | 1525 | nonundocount = 0; |
| 1531 | if (NILP (current_kboard->Vprefix_arg)) | 1526 | if (NILP (current_kboard->Vprefix_arg)) |
| 1532 | Fundo_boundary (); | 1527 | Fundo_boundary (); |
| 1533 | Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); | 1528 | Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); |
| 1529 | |||
| 1530 | #ifdef HAVE_X_WINDOWS | ||
| 1531 | if (display_busy_cursor_p) | ||
| 1532 | cancel_busy_cursor (); | ||
| 1533 | #endif | ||
| 1534 | } | 1534 | } |
| 1535 | directly_done: ; | 1535 | directly_done: ; |
| 1536 | current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; | 1536 | current_kboard->Vlast_prefix_arg = Vcurrent_prefix_arg; |
| @@ -3627,9 +3627,6 @@ timer_check (do_it_now) | |||
| 3627 | { | 3627 | { |
| 3628 | int was_locked = single_kboard; | 3628 | int was_locked = single_kboard; |
| 3629 | int count = specpdl_ptr - specpdl; | 3629 | int count = specpdl_ptr - specpdl; |
| 3630 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 3631 | int old_inhibit_busy_cursor = inhibit_busy_cursor; | ||
| 3632 | #endif | ||
| 3633 | 3630 | ||
| 3634 | /* Mark the timer as triggered to prevent problems if the lisp | 3631 | /* Mark the timer as triggered to prevent problems if the lisp |
| 3635 | code fails to reschedule it right. */ | 3632 | code fails to reschedule it right. */ |
| @@ -3637,17 +3634,9 @@ timer_check (do_it_now) | |||
| 3637 | 3634 | ||
| 3638 | specbind (Qinhibit_quit, Qt); | 3635 | specbind (Qinhibit_quit, Qt); |
| 3639 | 3636 | ||
| 3640 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 3641 | inhibit_busy_cursor = 2; | ||
| 3642 | #endif | ||
| 3643 | |||
| 3644 | call1 (Qtimer_event_handler, chosen_timer); | 3637 | call1 (Qtimer_event_handler, chosen_timer); |
| 3645 | timers_run++; | 3638 | timers_run++; |
| 3646 | 3639 | ||
| 3647 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 3648 | inhibit_busy_cursor = old_inhibit_busy_cursor; | ||
| 3649 | #endif | ||
| 3650 | |||
| 3651 | unbind_to (count, Qnil); | 3640 | unbind_to (count, Qnil); |
| 3652 | 3641 | ||
| 3653 | /* Resume allowing input from any kboard, if that was true before. */ | 3642 | /* 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 | this_single_command_key_start = 0; | 8482 | this_single_command_key_start = 0; |
| 8494 | } | 8483 | } |
| 8495 | 8484 | ||
| 8485 | #ifdef HAVE_X_WINDOWS | ||
| 8486 | if (display_busy_cursor_p) | ||
| 8487 | cancel_busy_cursor (); | ||
| 8488 | #endif | ||
| 8489 | |||
| 8496 | i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), | 8490 | i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), |
| 8497 | prompt, ! NILP (dont_downcase_last), | 8491 | prompt, ! NILP (dont_downcase_last), |
| 8498 | ! NILP (can_return_switch_frame), 0); | 8492 | ! NILP (can_return_switch_frame), 0); |
| 8499 | 8493 | ||
| 8494 | #ifdef HAVE_X_WINDOWS | ||
| 8495 | if (display_busy_cursor_p) | ||
| 8496 | start_busy_cursor (); | ||
| 8497 | #endif | ||
| 8498 | |||
| 8500 | if (i == -1) | 8499 | if (i == -1) |
| 8501 | { | 8500 | { |
| 8502 | Vquit_flag = Qt; | 8501 | Vquit_flag = Qt; |
| @@ -8538,10 +8537,20 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, | |||
| 8538 | this_single_command_key_start = 0; | 8537 | this_single_command_key_start = 0; |
| 8539 | } | 8538 | } |
| 8540 | 8539 | ||
| 8540 | #ifdef HAVE_X_WINDOWS | ||
| 8541 | if (display_busy_cursor_p) | ||
| 8542 | cancel_busy_cursor (); | ||
| 8543 | #endif | ||
| 8544 | |||
| 8541 | i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), | 8545 | i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), |
| 8542 | prompt, ! NILP (dont_downcase_last), | 8546 | prompt, ! NILP (dont_downcase_last), |
| 8543 | ! NILP (can_return_switch_frame), 0); | 8547 | ! NILP (can_return_switch_frame), 0); |
| 8544 | 8548 | ||
| 8549 | #ifdef HAVE_X_WINDOWS | ||
| 8550 | if (display_busy_cursor_p) | ||
| 8551 | start_busy_cursor (); | ||
| 8552 | #endif | ||
| 8553 | |||
| 8545 | if (i == -1) | 8554 | if (i == -1) |
| 8546 | { | 8555 | { |
| 8547 | Vquit_flag = Qt; | 8556 | Vquit_flag = Qt; |