unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Hourglass - how is it started and ended?
@ 2005-02-27  0:25 Lennart Borgman
  2005-02-27  5:05 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2005-02-27  0:25 UTC (permalink / raw)


I got a bit irritated that Emacs did not stop to show an hourglass after an
operation ended so I looked into the code. However while trying to find the
code for this I first stumbled on some other problems. I have some
difficulties to understand the code for starting the hourglass cursor:

1) There is a function start_hourglass. This starts a timer that turns on
the hourglass. The function start_hourglass begins with cancel_hourglass
which cancels the timer if it is already active and removes the hourglass if
it is shown. Why is it useful to begin with this? I would expect
start_hourglass to just do nothing if the hourglass was already shown (and
perhaps also if the timer was active). Can anyone please explain this?

2) In w32fns.c start_hourglass has a "#if 0" around the whole body part. Is
this actually run?? (The hourglass is shown on w32.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Hourglass - how is it started and ended?
  2005-02-27  0:25 Hourglass - how is it started and ended? Lennart Borgman
@ 2005-02-27  5:05 ` Eli Zaretskii
  2005-02-27  8:54   ` Lennart Borgman
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2005-02-27  5:05 UTC (permalink / raw)
  Cc: emacs-devel

> From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>
> Date: Sun, 27 Feb 2005 01:25:20 +0100
> 
> 1) There is a function start_hourglass. This starts a timer that turns on
> the hourglass. The function start_hourglass begins with cancel_hourglass
> which cancels the timer if it is already active and removes the hourglass if
> it is shown. Why is it useful to begin with this? I would expect
> start_hourglass to just do nothing if the hourglass was already shown (and
> perhaps also if the timer was active). Can anyone please explain this?

If you don't cancel the timer, it will expire at the wrong moment
(counted since the time it was set by whatever previous activation).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Hourglass - how is it started and ended?
  2005-02-27  5:05 ` Eli Zaretskii
@ 2005-02-27  8:54   ` Lennart Borgman
  0 siblings, 0 replies; 3+ messages in thread
From: Lennart Borgman @ 2005-02-27  8:54 UTC (permalink / raw)
  Cc: emacs-devel

----- Original Message ----- 
From: "Eli Zaretskii" <eliz@gnu.org>

> If you don't cancel the timer, it will expire at the wrong moment
> (counted since the time it was set by whatever previous activation).

Thanks, I see how it is implemented now. I thought of a rather different
model.

And my initial question was wrong. The hourglass I have seen in Emacs on w32
must have been started in some other way than by start_hourglass.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-27  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-27  0:25 Hourglass - how is it started and ended? Lennart Borgman
2005-02-27  5:05 ` Eli Zaretskii
2005-02-27  8:54   ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).