Re: Changing cursors



Got it, thanks for pointing out my mistake. Is there a way to find out
when a pointer, like the cursor in this case, can be
destroyed/unreferenced after it has been used without having to wait for
the program to core dump?

Havoc Pennington wrote:

Marco Quezada <mquezada nlxcorp com> writes:
You can use something like this:

gdk_window_set_cursor(GTK_WIDGET(window)->window,

gdk_cursor_new(GDK_WATCH));
gdk_flush();

This will use the default cursors defined in gdkcursors.h


This leaks the cursor, you need:
 cursor = gdk_cursor_new (GDK_WATCH);
 gdk_window_set_cursor (window, cursor);
 gdk_cursor_destroy (cursor);

Havoc

--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com







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