Re: Changing the cursor in a GTK+ 2 window



Dixit martyn.2.russell at bt.com (2003-03-28 10:47):
How does one change the cursor to the "watch" cursor in a GTK+ 2.0
window, and then change it back to normal?

        GdkCursor *cursor = NULL;
        cursor = gdk_cursor_new(GDK_WATCH);
        gdk_window_set_cursor (event->window, cursor);
        
        /* clean up */
        g_object_unref(G_OBJECT(cursor));

Thanks.

For some reason, g_object_unref() crashed on my system, but I found
that this call could be replaced with

    gdk_cursor_unref(cursor);

which does not crash.

-- 
Pierre Sarrazin <sarrazip at sympatico dot ca>



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