diff options
author | rsc <devnull@localhost> | 2005-05-02 04:20:14 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-05-02 04:20:14 +0000 |
commit | 7e9e092da8d0c91c8075d9f0a4b1700de8f46753 (patch) | |
tree | c025660e0b282f6b527c81bc5911106b17086209 /src/libdraw | |
parent | 1d620367bd070f2eae99a70f8537c701a737650a (diff) | |
download | plan9port-7e9e092da8d0c91c8075d9f0a4b1700de8f46753.tar.gz plan9port-7e9e092da8d0c91c8075d9f0a4b1700de8f46753.tar.bz2 plan9port-7e9e092da8d0c91c8075d9f0a4b1700de8f46753.zip |
Correct putsnarf-then-getsnarf race.
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/x11-itrans.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libdraw/x11-itrans.c b/src/libdraw/x11-itrans.c index 8b1c1376..041580ad 100644 --- a/src/libdraw/x11-itrans.c +++ b/src/libdraw/x11-itrans.c @@ -375,6 +375,12 @@ _xgetsnarf(XDisplay *xd) 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)? */ clipboard = XA_PRIMARY; |