Re: change mouse cursor back to default



Stefan!

On Mon, 22 Nov 2004 18:55:50 +0100, Stefan Kost said:

Hi Florian,

thats the way I do it (took me a while to figure as well):

GdkWindow *window=GTK_WIDGET(mywidget)->window;
GdkCursor *cursor=gdk_cursor_new(GDK_WATCH);

gdk_window_set_cursor(window,cursor);
gdk_cursor_unref(cursor);

// do something

gdk_window_set_cursor(window,NULL);

Thanks, I've got it now. :-)

My error has been that I used 
gtk_widget_get_root_window (GTK_WIDGET (widget))
to get a GdkWindow insted of GTK_WIDGET(widget)->window.

This way I change the cursor for my widget only and not for my whole
desktop which is a GoodThing(TM). ;-)

Ciao
Florian




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