That works, as it's the way screenshots of the debian-installer (which is gtkdfb based) are taken. Moreover, that's indipendent from the gdk backend used. i suspect you're confusing gtkwindow and gdkwindow: a gtkwindow's gdkwindow can be accessed as window->window
Attilio Arvind Ayyangar wrote: > This does not work for top level windows.. > I get an error >>assertion `GDK_IS_WINDOW (window)' failed > it works for the other widgets though.. > thanks Attilio > > The GdkWindowObject contains a list of children windows. > I think we can use that to get the surface dump... > > > On 1/4/07, Attilio Fiandrotti <[EMAIL PROTECTED]> wrote: > >> Arvin, IIUC you're trying to "get a dump" of a toplevel gdkwindow and >> related child gdkwindows, right? >> in this case you don't need to access directly the dfbwindow which is >> behind the toplevel gdkwindow, but just access the toplevel gdkwindow >> >> gdk_window = gtk_widget_get_parent_window ( <child gtk widget> ); >> gdk_window_get_geometry ( gdk_window, &x, &y, &width, &height, >> &depth); >> gdk_pixbuf = gdk_pixbuf_get_from_drawable (NULL, gdk_window, >> gdk_colormap_get_system(),0,0,0,0,width, height); >> gdk_pixbuf_save (gdk_pixbuf, <screenshot_file_name>, "png", NULL, >> NULL); >> >> hope this helps >> >> Attilio >> > _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
