summaryrefslogtreecommitdiff
path: root/src/XShm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XShm.c')
-rw-r--r--src/XShm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/XShm.c b/src/XShm.c
index 922b4cb..38efa9f 100644
--- a/src/XShm.c
+++ b/src/XShm.c
@@ -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);