diff options
author | Russ Cox <rsc@swtch.com> | 2010-07-22 13:52:56 -0700 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2010-07-22 13:52:56 -0700 |
commit | 4e2602a75400da71741721079d547e2b05e97a7c (patch) | |
tree | 0922c8d629d4ba8c62738ef4fcb27c7cfca830ce /src | |
parent | 1a3b9158967f946f56df937adfe803873115bea2 (diff) | |
download | plan9port-4e2602a75400da71741721079d547e2b05e97a7c.tar.gz plan9port-4e2602a75400da71741721079d547e2b05e97a7c.tar.bz2 plan9port-4e2602a75400da71741721079d547e2b05e97a7c.zip |
devdraw: snarf better with Chrome
maybe the code is also actually correct. who knows.
R=rsc
http://codereview.appspot.com/1875045
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/devdraw/x11-itrans.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/devdraw/x11-itrans.c b/src/cmd/devdraw/x11-itrans.c index d95f0cb1..a753fb6f 100644 --- a/src/cmd/devdraw/x11-itrans.c +++ b/src/cmd/devdraw/x11-itrans.c @@ -518,17 +518,16 @@ _xselect(XEvent *e) memset(&r, 0, sizeof r); xe = (XSelectionRequestEvent*)e; -if(0) fprint(2, "xselect target=%d requestor=%d property=%d selection=%d\n", - xe->target, xe->requestor, xe->property, xe->selection); +if(0) fprint(2, "xselect target=%d requestor=%d property=%d selection=%d (sizeof atom=%d)\n", + xe->target, xe->requestor, xe->property, xe->selection, sizeof a[0]); r.xselection.property = xe->property; if(xe->target == _x.targets){ a[0] = _x.utf8string; a[1] = XA_STRING; a[2] = _x.text; a[3] = _x.compoundtext; - - XChangeProperty(_x.display, xe->requestor, xe->property, xe->target, - 8*sizeof(a[0]), PropModeReplace, (uchar*)a, nelem(a)); + XChangeProperty(_x.display, xe->requestor, xe->property, XA_ATOM, + 32, PropModeReplace, (uchar*)a, nelem(a)); }else if(xe->target == XA_STRING || xe->target == _x.utf8string || xe->target == _x.text |