diff options
author | Jamey Sharp <jamey@minilop.net> | 2009-10-07 19:31:21 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2009-10-07 19:35:28 -0700 |
commit | 956fd30e1046e5779ac0b6c07ec4f0e87250869a (patch) | |
tree | ebd9f516db8d0763c3542a95a589ab2869fb73ec | |
parent | 927e3260bcf1ad020228e8f2dce0176269982b4f (diff) |
XAllocID must only be called with the Display lock held.
This patch makes XShmAttach follow the same XID allocation pattern used in
other stubs, such as XShmCreatePixmap.
Reported-by: <fdsteve@ihug.co.nz>
Signed-off-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r-- | src/XShm.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -235,12 +235,11 @@ Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) ShmCheckExtension (dpy, info, 0); - shminfo->shmseg = XAllocID(dpy); LockDisplay(dpy); GetReq(ShmAttach, req); req->reqType = info->codes->major_opcode; req->shmReqType = X_ShmAttach; - req->shmseg = shminfo->shmseg; + req->shmseg = shminfo->shmseg = XAllocID(dpy); req->shmid = shminfo->shmid; req->readOnly = shminfo->readOnly ? xTrue : xFalse; UnlockDisplay(dpy); |