Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverts a work-around for an old Ubuntu X11 bug #501

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions src/cmd/devdraw/x11-draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ xdraw(Memdrawparam *par)
{
u32int sdval;
uint m, state;
Memimage *dst, *mask;
Point dp, mp;
Memimage *src, *dst, *mask;
Point dp, mp, sp;
Rectangle r;
Xmem *xdst, *xmask;
Xmem *xdst, *xmask, *xsrc;
XGC gc;

if(par->dst->X == nil)
Expand All @@ -56,6 +56,7 @@ xdraw(Memdrawparam *par)
dst = par->dst;
mask = par->mask;
r = par->r;
src = par->src;
state = par->state;

/*
Expand All @@ -73,15 +74,9 @@ xdraw(Memdrawparam *par)
* If no source alpha and an opaque mask, we can just copy
* the source onto the destination. If the channels are the
* same and the source is not replicated, XCopyArea works.
*
* This is disabled because Ubuntu Precise seems to ship with
* a buggy X server that sometimes drops the XCopyArea
* requests on the floor.
*/
m = Simplemask|Fullmask;
if((state&(m|Replsrc))==m && src->chan==dst->chan && src->X){
Xmem *xsrc;
Point sp;

xdst = dst->X;
xsrc = src->X;
dp = subpt(r.min, dst->r.min);
Expand All @@ -90,10 +85,9 @@ xdraw(Memdrawparam *par)

XCopyArea(_x.display, xsrc->pixmap, xdst->pixmap, gc,
sp.x, sp.y, Dx(r), Dy(r), dp.x, dp.y);
/* xdirtyxdata(dst, r); * /
/* xdirtyxdata(dst, r); */
return 1;
}
*/

/*
* If no source alpha, a 1-bit mask, and a simple source,
Expand Down