[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hourglass only for X-windows?
From: |
Eli Zaretskii |
Subject: |
Re: Hourglass only for X-windows? |
Date: |
Sun, 27 Feb 2005 22:29:06 +0200 |
> From: "Lennart Borgman" <address@hidden>
> Date: Sun, 27 Feb 2005 18:57:08 +0100
>
> I am trying to understand the implementation around hourglass cursors. When
> I look through eval.c, fns.c, keyboard.c, lread.c and minibuf.c I see in
> many places something like:
>
> #ifdef HAVE_X_WINDOWS
> if (display_hourglass_p)
> cancel_hourglass ();
> #endif
>
> Is this really correct?
Yes, I think so.
> It looks like displaying an hourglass cursor should only happen if x
> windows is available.
What other systems? If you refer to Windows, then please see
w32fns.c, where the timer-related hourglass code is ifdef'ed away
(probably because Windows doesn't emulate well Posix timers that raise
asynchronous signals). The Windows implementation of hourglass
cursor, if I understand it correctly, is synchronous, i.e. the
redisplay code and the idle loop set and reset it.
Of other non-X ports, the MSDOS port doesn't support this feature at
all (you cannot change the Windows mouse pointer shape from a DOS
program running on Windows, and doing so on plain DOS involves
undesirable complications).
As for MacOS X, I don't know.
> Maybe it would be better to remove these ifdefs and require every Emacs
> implementation to compile the lines? Does not most systems actually have the
> possibility to display hourglass cursors? If they do not could the
> implementation not just supply some dummies for the required functions?
That'd not be a good idea, I think: firing SIGALRM signals by the
timers complicates things (e.g., you get to handle the problem of
interrupted system calls), so it shouldn't be done without a good
reason.