diff options
author | Russ Cox <rsc@golang.org> | 2020-01-12 14:53:46 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-01-13 16:46:14 -0500 |
commit | 50923426bf684402160dd7748f14560afd447b73 (patch) | |
tree | ddabd607a5936424e70920e4aed7790bec61cca1 /src/cmd/devdraw/x11-alloc.c | |
parent | 892b3c4687eacf6b090bb9a5196ce882e113c423 (diff) | |
download | plan9port-50923426bf684402160dd7748f14560afd447b73.tar.gz plan9port-50923426bf684402160dd7748f14560afd447b73.tar.bz2 plan9port-50923426bf684402160dd7748f14560afd447b73.zip |
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.
Diffstat (limited to 'src/cmd/devdraw/x11-alloc.c')
-rw-r--r-- | src/cmd/devdraw/x11-alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
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. |