From 25a6bc31f431f59147739876f1d9a96340b65fb2 Mon Sep 17 00:00:00 2001 From: iovar Date: Tue, 13 Mar 2007 19:58:05 +0000 Subject: fixed xdamage with xshm and removed anything related to conditional shared memory usage. Added GetZPixmapShm.Cleaned up pdata stuct from unneeded members. Removed argumednts related to conditional shared (--no-cond-shared, --shared threshold).Changed default for Shm and --with-shared is now --no-shared. Also, dummy cursor has been shaped up a bit. Version changed to 0.3.4-cvs. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@293 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/getzpixmap.c | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'recordmydesktop/src/getzpixmap.c') diff --git a/recordmydesktop/src/getzpixmap.c b/recordmydesktop/src/getzpixmap.c index 6deaf15..38ef42d 100644 --- a/recordmydesktop/src/getzpixmap.c +++ b/recordmydesktop/src/getzpixmap.c @@ -59,3 +59,45 @@ int GetZPixmap(Display *dpy, return 0; } +int GetZPixmapSHM(Display *dpy, + Window root, + XShmSegmentInfo *shminfo, + int shm_opcode, + char *data, + int x, + int y, + int width, + int height){ + xShmGetImageReply reply; + xShmGetImageReq *request=NULL; + long nbytes; + + LockDisplay(dpy); + GetReq(ShmGetImage,request); + + request->reqType=shm_opcode; + request->shmReqType=X_ShmGetImage; + request->shmseg=shminfo->shmseg; + + request->drawable=root; + request->x=x; + request->y=y; + request->width=width; + request->height=height; + request->planeMask=AllPlanes; + request->format=ZPixmap; + request->offset=data-shminfo->shmaddr; + + if((!_XReply(dpy,(xReply *)&reply,0,xFalse))||(!reply.length)){ + UnlockDisplay(dpy); + SyncHandle(); + return 1; + } + + nbytes=(long)reply.length << 2; + _XReadPad(dpy,data,nbytes); + UnlockDisplay(dpy); + SyncHandle(); + + return 0; +} -- cgit v1.2.3