Re: implementing a delayed "busy" cursor
- From: Paul Davis <paul linuxaudiosystems com>
- To: Paul Fox <pgf foxharp boston ma us>
- Cc: gtk-list gnome org
- Subject: Re: implementing a delayed "busy" cursor
- Date: Sun, 05 Aug 2007 12:43:01 -0400
On Sun, 2007-08-05 at 11:20 -0400, Paul Fox wrote:
> hi --
>
> i want the mouse cursor in my app to only switch to "busy" after
> a brief delay (perhaps 1 second). i have an implementation that
> works in some places, but not others, and i'm wondering if
> there's a better/safer way.
> if (newcursor == CURSOR_BUSY_WITH_DELAY) {
> signal(SIGALRM, busy_cursor_handler);
> alarm(1);
this is unsafe coding. POSIX signal handlers should do almost nothing,
and they should certainly not call GTK functions.
investigate the use of timeouts within GTK itself, which are *much*
better suited for this purpose.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]