Re: Can't get Gdk::Window from Gtk::Window



 I'm stuck trying to figure out how to get a Gdk::Window from a
 Gtk::Window.

You should be able to use Gtk::Widget::get_window().  This will return
NULL before the widget is realized, but after it is realized it should
return a valid Gdk::Window.

That seems to work, I wasn't all that clear on how the inheritance worked between Gtk::Window and Gtk::Widget.

Yes, this seems like a case where the the C documentation was not
customized correctly for the C++ API.  I think you should be able to
pass a 'NULL' RefPtr<Pixmap> to this parameter and it should work.
e.g.
Glib::RefPtr<Pixmap> none;
w->set_back_pixmap(none ...)

I haven't tested it to make sure though.

here's a bug I filed for the issue:
http://bugzilla.gnome.org/show_bug.cgi?id=525967

Yes, that syntax does appear to work as you've indicated in the bug, but I agree that a dedicated unset_* function would be a lot more intuitive!

Thanks for your help!

Cheers,
Adam.


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