Direct access to window off-screen buffer

Troll Berserker berserker.troll at yandex.com
Sun Feb 4 02:50:50 UTC 2018


Hi all,

Is is possible to directly (using MIT-SHM) access the off-screen storage of the redirected (using Composite extension) window?
I've tried (using XCompositeNameWindowPixmap + XShmCreatePixmap) and it seems that the modifying the memory doesn't modify window's content, so I won't post the code here.
Someone may guess that I don't see changes because my compositor doesn't get Damage event and doesn't update screen, but this is not the case. I've slightly modified xcompmgr and try to get the SHMed Pixmap and modify it shortly before it calls XRenderComposite.

I've thought a bit and I now I'm thinking that there is should be no surprise that XShmCreatePixmap doesn't work. It expects segment of already allocated memory, but the off-screen is already allocated somewhere else.

So, if I understand everything correctly and it is not possible to directly access the off-screen buffer of the window, the question: what is the fastest way to access its contents? Using XShmCreateImage+XShmGetImage?


More information about the xorg mailing list