Re: implementing a delayed "busy" cursor
- From: Paul Fox <pgf foxharp boston ma us>
- To: gtk-list gnome org
- Subject: Re: implementing a delayed "busy" cursor
- Date: Sun, 05 Aug 2007 12:56:04 -0400
paul davis wrote:
> 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.
okay, thanks -- that confirms my suspicions (and results :-).
will these timeouts (can you point me at an API function i can
search for?) work asynchronously to the main event loop?
paul
=---------------------
paul fox, pgf foxharp boston ma us (arlington, ma, where it's 72.9 degrees)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]