XWindows - how capture window ?

XWindows - how capture window ?

Erez D erez0001 at gmail.com
Thu Mar 4 15:59:27 IST 2010


sorry i can not give you a solution, but i can give you a pointer.

composite window managers (i.e. compiz, baryl) work by drawing the original
window off screen, then read it as a 2D picture, and render it back to the
screen with certain effects.

So i know it is possible to grab an off screen window. I do not know however
how to make it off screen.

There is an X Extension called XDamage, which reports changes on the window
so you do not have to poll it for changes. These window managers use it.


well, thats my 2c,
hopes it helps,
erez.

On Sat, Feb 20, 2010 at 10:13 PM, Valery Reznic <valery_reznic at yahoo.com>wrote:

> Hi all.
>
> I faced following problem:
> I have X-Windows application. It has a lot of different functions and
> buttons.
>
> When one of those buttons is pressed applications open a window
> This window has a lot of different widgets inside (labels, pixmaps,
> buttons, etc)
>
> I need to capture this windows and save it content to the file.
> It's not that hard - xgrabsc program do all the work.
>
> But what is hard (at least hard for me :) is to capture content of this
> window, without it appearing on the screen.
>
> I have source of this application, and can change it as I like.
> The trouble is unless windows actually appears on the screen, xserver don't
> bother to draw it.
>
> My screen is 640x480 I tried to create window with offset 641 and 481 - i.e
> off screen. It doesn't work. I.e window created and grabbed by xgrabsc, but
> it's content is garbage.
> When offse is 400and 400 then part of the window appears on the screen and
> part not.
> After grabbing this window I saw, that part that appears on screen looks
> OK, but other part is garbage.
>
> I also tried to use XComoposite extension - without any success.
>
> Application is very, very ancient. It was written withusing Xlib functions
> and Xt toolkit - hardly more.
>
> Also application uses XSHM extension, i.e solution don't have be
> "network-aware" - anyway this application doomed to work only locally by
> this extension.
>
> I by no mean X expert, may be I missed something obvious with XComposite
> or just missed something
>
> Do you have any ideas, how can I render this window off screen and capture
> it's content ?
>
> Valery.
>
>
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20100304/f61827c2/attachment.html>


More information about the Linux-il mailing list