Re: Desktop screenshot
- From: Claudio Saavedra <csaavedra gnome org>
 
- To: gtk-list gnome org
 
- Subject: Re: Desktop screenshot
 
- Date: Mon, 26 Apr 2010 14:47:13 +0300
 
On Mon, 2010-04-26 at 13:37 +0200, Andy Bell wrote:
> Hi,
> 
> 
> I am trying to get a screenshot of the desktop by using a transparent
> GtkWidget and then using gdk_pixbuf_get_from_drawable.   When I check
> the saved GdkPixbuf I am getting a valid image, but the image does not
> include the background of the desktop but just the GtkWidget itself.
> Is there any way of working around this?
Why not simply doing something like this?
window = gdk_get_default_root_window ();
gdk_drawable_get_size (window, &width, &height);
image = gdk_pixbuf_get_from_drawable (NULL, window,
                                      gdk_drawable_get_colormap(window),
				      0, 0,
				      0, 0,
                                      width, height);
Claudio
-- 
Claudio Saavedra <csaavedra gnome org>
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]