mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
devdraw: snarf better with Chrome
maybe the code is also actually correct. who knows. R=rsc http://codereview.appspot.com/1875045
This commit is contained in:
parent
1a3b915896
commit
4e2602a754
1 changed files with 4 additions and 5 deletions
|
@ -518,17 +518,16 @@ _xselect(XEvent *e)
|
||||||
|
|
||||||
memset(&r, 0, sizeof r);
|
memset(&r, 0, sizeof r);
|
||||||
xe = (XSelectionRequestEvent*)e;
|
xe = (XSelectionRequestEvent*)e;
|
||||||
if(0) fprint(2, "xselect target=%d requestor=%d property=%d selection=%d\n",
|
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);
|
xe->target, xe->requestor, xe->property, xe->selection, sizeof a[0]);
|
||||||
r.xselection.property = xe->property;
|
r.xselection.property = xe->property;
|
||||||
if(xe->target == _x.targets){
|
if(xe->target == _x.targets){
|
||||||
a[0] = _x.utf8string;
|
a[0] = _x.utf8string;
|
||||||
a[1] = XA_STRING;
|
a[1] = XA_STRING;
|
||||||
a[2] = _x.text;
|
a[2] = _x.text;
|
||||||
a[3] = _x.compoundtext;
|
a[3] = _x.compoundtext;
|
||||||
|
XChangeProperty(_x.display, xe->requestor, xe->property, XA_ATOM,
|
||||||
XChangeProperty(_x.display, xe->requestor, xe->property, xe->target,
|
32, PropModeReplace, (uchar*)a, nelem(a));
|
||||||
8*sizeof(a[0]), PropModeReplace, (uchar*)a, nelem(a));
|
|
||||||
}else if(xe->target == XA_STRING
|
}else if(xe->target == XA_STRING
|
||||||
|| xe->target == _x.utf8string
|
|| xe->target == _x.utf8string
|
||||||
|| xe->target == _x.text
|
|| xe->target == _x.text
|
||||||
|
|
Loading…
Reference in a new issue