From fa325e9b42b0bdfb48857d1958d9fb7ceac55151 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Fri, 10 Jan 2020 14:44:21 +0000 Subject: Trivial changes: whitespace and modes. Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross --- src/cmd/devdraw/x11-alloc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/cmd/devdraw/x11-alloc.c') diff --git a/src/cmd/devdraw/x11-alloc.c b/src/cmd/devdraw/x11-alloc.c index a465f998..9d85b451 100644 --- a/src/cmd/devdraw/x11-alloc.c +++ b/src/cmd/devdraw/x11-alloc.c @@ -121,4 +121,3 @@ freememimage(Memimage *m) } _freememimage(m); } - -- cgit v1.2.3 From 50923426bf684402160dd7748f14560afd447b73 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 12 Jan 2020 14:53:46 -0500 Subject: devdraw: x11 working again Need to think a bit more about locking, but overall it's a working devdraw. Multiclient mode may not be working but nothing is using it yet. --- src/cmd/devdraw/x11-alloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cmd/devdraw/x11-alloc.c') diff --git a/src/cmd/devdraw/x11-alloc.c b/src/cmd/devdraw/x11-alloc.c index 9d85b451..cee93064 100644 --- a/src/cmd/devdraw/x11-alloc.c +++ b/src/cmd/devdraw/x11-alloc.c @@ -21,7 +21,7 @@ _xallocmemimage(Rectangle r, u32int chan, int pixmap) m = _allocmemimage(r, chan); if(chan != GREY1 && chan != _x.chan) return m; - if(_x.display == 0) + if(_x.display == 0 || _x.windows == nil) return m; /* @@ -49,7 +49,7 @@ _xallocmemimage(Rectangle r, u32int chan, int pixmap) if(pixmap != PMundef) xm->pixmap = pixmap; else - xm->pixmap = XCreatePixmap(_x.display, _x.drawable, Dx(r), Dy(r), d); + xm->pixmap = XCreatePixmap(_x.display, _x.windows->drawable, Dx(r), Dy(r), d); /* * We want to align pixels on word boundaries. -- cgit v1.2.3