Delete the shm segment as soon as wine and X have attached it.
This commit is contained in:
parent
e63fdf10f2
commit
e4c4651833
|
@ -3245,6 +3245,8 @@ extern BOOL X11DRV_XShmCreateImage(XImage** image, int width, int height, int bp
|
||||||
|
|
||||||
if (!XShmErrorFlag)
|
if (!XShmErrorFlag)
|
||||||
{
|
{
|
||||||
|
shmctl(shminfo->shmid, IPC_RMID, 0);
|
||||||
|
|
||||||
XSetErrorHandler(WineXHandler);
|
XSetErrorHandler(WineXHandler);
|
||||||
LeaveCriticalSection( &X11DRV_CritSection );
|
LeaveCriticalSection( &X11DRV_CritSection );
|
||||||
|
|
||||||
|
@ -3438,7 +3440,6 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
|
||||||
TSXShmDetach (display, &(dib->shminfo));
|
TSXShmDetach (display, &(dib->shminfo));
|
||||||
XDestroyImage (dib->image);
|
XDestroyImage (dib->image);
|
||||||
shmdt (dib->shminfo.shmaddr);
|
shmdt (dib->shminfo.shmaddr);
|
||||||
shmctl (dib->shminfo.shmid, IPC_RMID, 0);
|
|
||||||
dib->shminfo.shmid = -1;
|
dib->shminfo.shmid = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue