Get raw data of Xrender Picture structure

Lubos Lunak l.lunak at suse.cz
Mon Dec 8 11:45:09 PST 2008


On Monday 08 of December 2008, Gregoire Gentil wrote:
> Hello,
>
> I would like to get the raw data of the Picture structure in Xrender.
> Basically, I would like to import into a GdkPixbuf, a picture returned
> by XRenderCreatePicture. There doesn't seem to be any data export
> function in Xrender. Any pointer how I could achieve this?

 Isn't XRender's Picture just a kind of a handle for performing XRender 
operations on a drawable? Meaning the contents are still stored only by the 
drawable and not by XRender? (I'm not actually quite sure about this, but 
anyway it doesn't matter here.)

> PS: What do I need to do that? Because I want to preview in a gtk+
> application the content of a window that is minimized (like Compiz or
> Vista can do). gdk_pixbuf_get_from_drawable returns garbage with a
> minimized windows and I think that xrender will return at least the
> outdated content of the window. My windows and compositing manager is
> xfwm4 which doesn't support this feature. I'm then trying to shortcut
> xfwm4 and get what I want directly from Xrender.

 I don't think that would work. The usual way to implement a minimized window 
is to unmap the window and (AFAIK) there is no way to get contents of an 
unmapped window, so this needs support from the window/compositing manager 
anyway. You can ask developers of the WM/CM you use for a specific support or 
you can try to create a generic support for this (there is no list for 
compositing managers that I'd know of, so probably the best bet is the 
mailing list for the wm-spec 
[http://www.freedesktop.org/wiki/Specifications/wm-spec]).

 Moreover, it looks to me a bit like you're trying to create a hack that 
should be instead done by the compositing manager or the taskbar, but that's 
a separate matter.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http://www.suse.cz



More information about the xorg mailing list