Cursors
- From: lightmanaj earthlink net
- To: gtk-list redhat com
- Subject: Cursors
- Date: Fri, 24 Sep 1999 18:08:19 -0700
Ugggh...this stinks. :*(
Every time I get past a major hurdle in GTK+, another one comes
up.
For some odd reason, the gdk_window_set_cursor doesn't always
work. What I want to do is to change my window's cursor to an
hourglass whenever a button is clicked, before a modal dialog box
appears. However, the function ALWAYS works for one of the
buttons I press, but NEVER works for the others. This behavior is
consistent, and the mechanism for calling gdk_window_set_cursor
isn't any different for any of the buttons!
An example:
/* My window is a global variable. */
static GtkWidget *my_window;
/* These are my cursors. */
static GdkCursor *cursor_arrow;
static GdkCursor *cursor_wait;
/* This is one of the button's callback functions. */
void callback_function (GtkWidget *widget, gpointer data)
{
/* Change the window's cursor to an hourglass. */
gdk_window_set_cursor
(
panel_window -> window, cursor_wait
);
/*
* Perform the button's intended operation, which doesn't
* block GTK event processing.
*/
perform_button_operation ();
/*
* Restore the main panel's cursor
* to the left-arrow pointer.
*/
gdk_window_set_cursor
(
panel_window -> window,
cursor_arrow
);
}
But for some reason, this isn't working. Is there something I'm
missing?
Thanks,
--Arthur
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]