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.

mmm, what version of gtk are you using? I am using 2.0.6.

Regards,
Martyn



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