diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-10 14:03:10 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-01-10 14:03:10 +0000 |
commit | 07f7df3208a71e35167e5dfd418d6e304a56d795 (patch) | |
tree | bf14d3e7e565a64a75bfdb7d4e1c3a20a8c13ba5 /gui | |
parent | 894acafa51fb23677fa6cb8b1c1ef9986f07dbea (diff) |
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
Diffstat (limited to 'gui')
-rw-r--r-- | gui/wm/ws.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gui/wm/ws.c b/gui/wm/ws.c index 8133baab09..27ca7ae411 100644 --- a/gui/wm/ws.c +++ b/gui/wm/ws.c @@ -1172,6 +1172,7 @@ void wsCreateImage( wsTWindow * win,int Width,int Height ) win->xImage->data=win->Shminfo.shmaddr; win->Shminfo.readOnly=0; XShmAttach( wsDisplay,&win->Shminfo ); + XSync(wsDisplay, False); shmctl( win->Shminfo.shmid,IPC_RMID,0 ); } else |