Call XSync after XShmAttach to avoid a possible race-condition with shmctl.

Patch from FreeBSD ports.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30260 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-01-10 14:03:10 +00:00
parent 894acafa51
commit 07f7df3208
1 changed files with 1 additions and 0 deletions

View File

@ -1172,6 +1172,7 @@ void wsCreateImage( wsTWindow * win,int Width,int Height )
win->xImage->data=win->Shminfo.shmaddr; win->xImage->data=win->Shminfo.shmaddr;
win->Shminfo.readOnly=0; win->Shminfo.readOnly=0;
XShmAttach( wsDisplay,&win->Shminfo ); XShmAttach( wsDisplay,&win->Shminfo );
XSync(wsDisplay, False);
shmctl( win->Shminfo.shmid,IPC_RMID,0 ); shmctl( win->Shminfo.shmid,IPC_RMID,0 );
} }
else else