XShmCreatePixmap() as copy dest for XCopyArea()

xorg at pengaru.com xorg at pengaru.com
Tue Jul 7 20:13:54 UTC 2020


Hello list,

I'm trying to use XShmCreatePixmap() in combination with XCopyArea()
to achieve something resembling an XShmGetSubImage() for copying
damaged areas piecemeal out of the root window into a shmseg for a
screencap tool.

It seems like no matter what I do, the XCopyArea() never actually
writes to the shmseg.  If instead I use XShmGetImage() with the same
source drawable (root) and an XShmImage created from the very same
shminfo as the XShmPixmap, my shmseg gets written to just fine - but it
fills the entire XShmImage on every update which I'd like to avoid.

Does this sound familiar to anyone experienced using
XShmCreatePixmap() with XCopyArea()?

Do I need to do something special with the GC to make things happen?
I'm using the DefaultGC from the same root window as the CopyArea
source, which is also the drawable supplied to XShmCreatePixmap().

I'm not seeing any errors, the XCopyArea() seems to be happening, but
the shmseg just isn't being modified.  My server reports ZPixmap as
the supported XShmPixmapFormat(), it's a garden variety
xorg-modesetting on i915.

Thanks,
Vito Caputo


More information about the xorg-devel mailing list