emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "About Emacs" menu item?


From: Pavel Janík
Subject: Re: "About Emacs" menu item?
Date: Thu, 31 Jan 2002 09:55:10 +0100
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

Hi,

the problem with (setq display-hourglass nil) seems to be pretty
simple. I though it would be better to debug it under debugger, but under
gdb it is OK :-(

But I have found the culprit anyway:

In keyboard.c:command_loop_1 we are doing this:

--- cut here ---
          /* Here for a command that isn't executed directly */

#ifdef HAVE_X_WINDOWS
          if (display_hourglass_p)
            start_hourglass ();
#endif

          nonundocount = 0;
          if (NILP (current_kboard->Vprefix_arg))
            Fundo_boundary ();
          Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);

#ifdef HAVE_X_WINDOWS
          if (display_hourglass_p)
            cancel_hourglass ();
#endif
--- cut here ---

1. Ie. if we are allowed to display hourglass cursor, we will call
start_hourglass. Hourglass pointer will be displayed in hourglass-delay
seconds.

2. Then we will execute our command.

3. Then again, if we are allowed to display hourglass cursor, we will call
cancel_hourglass. Which will in effect cancel the timer started in
start_hourglass and change pointer to normal.


Hmm, but the problem is that our command disables hourglass cursor
displaying and in effect, only start_hourglass is called. So the final
effect of this command is that we are no longer allowed to display
hourglass pointer, but it is displayed now!

So, IIRC, this is the change which can help here:

--- keyboard.c.~1.651.~ Thu Jan 31 07:59:20 2002
+++ keyboard.c  Thu Jan 31 09:10:55 2002
@@ -1641,8 +1641,10 @@
          Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
 
 #ifdef HAVE_X_WINDOWS
-         if (display_hourglass_p)
-           cancel_hourglass ();
+         /* Do not check display_hourglass_p here, because
+            Fcommand_execute could change it, but we should cancel
+            hourglass cursor anyway.  */
+         cancel_hourglass ();
 #endif
        }
     directly_done: ;


What do you think? 
-- 
Pavel Janík

But for the user this does not matter, he just sees a frozen
machine. Even if it would recover in some hours ;)
                  -- Hubert Mantel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]