diff options
| -rw-r--r-- | src/xfns.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xfns.c b/src/xfns.c index e412cc568c6..d5e966ed6bc 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -10088,17 +10088,25 @@ void | |||
| 10088 | start_busy_cursor () | 10088 | start_busy_cursor () |
| 10089 | { | 10089 | { |
| 10090 | EMACS_TIME delay; | 10090 | EMACS_TIME delay; |
| 10091 | int secs; | 10091 | int secs, usecs = 0; |
| 10092 | 10092 | ||
| 10093 | cancel_busy_cursor (); | 10093 | cancel_busy_cursor (); |
| 10094 | 10094 | ||
| 10095 | if (INTEGERP (Vbusy_cursor_delay) | 10095 | if (INTEGERP (Vbusy_cursor_delay) |
| 10096 | && XINT (Vbusy_cursor_delay) > 0) | 10096 | && XINT (Vbusy_cursor_delay) > 0) |
| 10097 | secs = XFASTINT (Vbusy_cursor_delay); | 10097 | secs = XFASTINT (Vbusy_cursor_delay); |
| 10098 | else if (FLOATP (Vbusy_cursor_delay) | ||
| 10099 | && XFLOAT_DATA (Vbusy_cursor_delay) > 0) | ||
| 10100 | { | ||
| 10101 | Lisp_Object tem; | ||
| 10102 | tem = Ftruncate (Vbusy_cursor_delay, Qnil); | ||
| 10103 | secs = XFASTINT (tem); | ||
| 10104 | usecs = (XFLOAT_DATA (Vbusy_cursor_delay) - secs) * 1000000; | ||
| 10105 | } | ||
| 10098 | else | 10106 | else |
| 10099 | secs = DEFAULT_BUSY_CURSOR_DELAY; | 10107 | secs = DEFAULT_BUSY_CURSOR_DELAY; |
| 10100 | 10108 | ||
| 10101 | EMACS_SET_SECS_USECS (delay, secs, 0); | 10109 | EMACS_SET_SECS_USECS (delay, secs, usecs); |
| 10102 | busy_cursor_atimer = start_atimer (ATIMER_RELATIVE, delay, | 10110 | busy_cursor_atimer = start_atimer (ATIMER_RELATIVE, delay, |
| 10103 | show_busy_cursor, NULL); | 10111 | show_busy_cursor, NULL); |
| 10104 | } | 10112 | } |
| @@ -10994,7 +11002,7 @@ or when you set the mouse color."); | |||
| 10994 | 11002 | ||
| 10995 | DEFVAR_LISP ("busy-cursor-delay", &Vbusy_cursor_delay, | 11003 | DEFVAR_LISP ("busy-cursor-delay", &Vbusy_cursor_delay, |
| 10996 | "*Seconds to wait before displaying a busy-cursor.\n\ | 11004 | "*Seconds to wait before displaying a busy-cursor.\n\ |
| 10997 | Value must be an integer."); | 11005 | Value must be an integer or float."); |
| 10998 | Vbusy_cursor_delay = make_number (DEFAULT_BUSY_CURSOR_DELAY); | 11006 | Vbusy_cursor_delay = make_number (DEFAULT_BUSY_CURSOR_DELAY); |
| 10999 | 11007 | ||
| 11000 | #if 0 /* This doesn't really do anything. */ | 11008 | #if 0 /* This doesn't really do anything. */ |