More fixes.

This commit is contained in:
Russ Cox
2005-10-17 16:39:16 +00:00
parent 54ca86f879
commit 82b1d4d6c2
2 changed files with 19 additions and 5 deletions

View File

@ -116,7 +116,9 @@ screeninit(void)
memimageinit();
terminit();
drawqlock();
flushmemscreen(gscreen->r);
drawqunlock();
}
uchar*
@ -1115,9 +1117,12 @@ xselect(XEvent *e, Display *xd)
XSelectionRequestEvent *xe;
Atom a[4];
if(e->xany.type != SelectionRequest)
return;
memset(&r, 0, sizeof r);
xe = (XSelectionRequestEvent*)e;
if(0) fprint(2, "xselect target=%d requestor=%d property=%d selection=%d\n",
if(0) iprint("xselect target=%d requestor=%d property=%d selection=%d\n",
xe->target, xe->requestor, xe->property, xe->selection);
r.xselection.property = xe->property;
if(xe->target == targets){
@ -1135,9 +1140,12 @@ if(0) fprint(2, "xselect target=%d requestor=%d property=%d selection=%d\n",
8, PropModeReplace, (uchar*)clip.buf, strlen(clip.buf));
qunlock(&clip.lk);
}else{
iprint("get %d\n", xe->target);
name = XGetAtomName(xd, xe->target);
if(strcmp(name, "TIMESTAMP") != 0)
fprint(2, "%s: cannot handle selection request for '%s' (%d)\n", argv0, name, (int)xe->target);
if(name == nil)
iprint("XGetAtomName failed\n");
else if(strcmp(name, "TIMESTAMP") != 0)
iprint("%s: cannot handle selection request for '%s' (%d)\n", argv0, name, (int)xe->target);
r.xselection.property = None;
}