Re: Wrapper for gdk_get_default_root_window()?



On Fri, 2007-01-19 at 12:02 -0600, Matt Fischer wrote:
> Hi all.  I'm writing a program that needs to get access to the X root
> window, and I can't seem to find a Gtkmm wrapper for
> gdk_get_default_root_window().

True. A patch would be welcome, in bugzilla, to add it to future
versions of gtkmm. I guess it should be a static method of Gdk::Window.

>   Doing the following works fine: 
> 
> Glib::RefPtr<Gdk::Window> root = Glib::wrap
> (gdk_get_default_root_window()); 

And do 
root->reference()
because gdk_get_default_root_window() does not provide a reference.
gtkmm methods normal do that kind of thing for you.

> but that seems ugly.  Is there some type of API that Gdkmm introduces
> around this call that I should be using instead, or is it simply not
> wrapped?

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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