diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-03-13 19:58:05 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-03-13 19:58:05 +0000 |
commit | 25a6bc31f431f59147739876f1d9a96340b65fb2 (patch) | |
tree | 818ca96f721cbc42da2ff9f8b18afde4c40fe830 /recordmydesktop/src/getzpixmap.c | |
parent | ee0b215b94e92a1592a9f7c817c8dd0acefdce83 (diff) |
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
Diffstat (limited to 'recordmydesktop/src/getzpixmap.c')
-rw-r--r-- | recordmydesktop/src/getzpixmap.c | 42 |
1 files changed, 42 insertions, 0 deletions
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; +} |