Re: how to display "busy" cursor ? and another question



On Sun, 5 Oct 2008, Han wrote:

Thanks Allin. I tried your example code and it somehow did not work
for me, i.e. the cursor does not show "watch".  

It can be tricky deciding which window(s) should display the watch 
cursor. See John Cupitt's suggestion.

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

[Han]  why do we call gdk_cursor_unref here ?

Otherwise (as I understand it) we'll leak memory, since a local 
reference to the newly created cursor will be retained (preventing 
its being freed), and the relevant pointer will fall out of scope 
when the enclosing function returns.

Allin Cottrell




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