Re: implementing a delayed "busy" cursor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux