changeset 27862:03d8d5f30d54

(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.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 25 Feb 2000 13:30:50 +0000
parents ef7c1ba652b2
children 30eebaedce93
files src/keyboard.c
diffstat 1 files changed, 26 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Feb 25 13:30:07 2000 +0000
+++ b/src/keyboard.c	Fri Feb 25 13:30:50 2000 +0000
@@ -1519,18 +1519,18 @@
 
 #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 @@
 	    {
 	      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 @@
 
 	      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 @@
       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 @@
       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;