Correct putsnarf-then-getsnarf race.

This commit is contained in:
rsc 2005-05-02 04:20:14 +00:00
parent 1d620367bd
commit 7e9e092da8

View file

@ -374,6 +374,12 @@ _xgetsnarf(XDisplay *xd)
XWindow w;
qlock(&clip.lk);
/*
* Have we snarfed recently and the X server hasn't caught up?
*/
if(_x.putsnarf != _x.assertsnarf)
goto mine;
/*
* Is there a primary selection (highlighted text in an xterm)?
*/