[gtkmm] How to restore cursor?



Hi,

I've tried to play with window cursor for toplevel window:

    Gdk::Cursor cur(Gdk::WATCH);
    get_window()->set_cursor (cur);

    ...

    Gdk::Cursor cur(0);
    get_window()->set_cursor (cur);

Gdk-CRITICAL **: file gdkcursor.c: line 53 (gdk_cursor_ref): assertion
`cursor != NULL' failed

I haven't tried gdk_window_set_cursor (window, NULL) that supposed to
restore cursor from parent. Anyway, I would to know how to do it using
gtkmm?

There is no Gdk::window::get_cursor method to store old cursor, neither
set_cursor(default), isn't it?

Probably, I am doing all wrong, so, my goal is to set cursor to watch
for one toplevel window and all it's children, then restore it at some
time, any suggestions?

thanks in advance,
-andrew





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