From 6ff3931470534f22415baa05817ae1bc8aa22d6c Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 17 Dec 2012 18:34:06 +0000 Subject: stash the default screen visual and colormap in screen_ctx --- xutil.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index 53c191f..cdb7321 100644 --- a/xutil.c +++ b/xutil.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: xutil.c,v 1.50 2012/12/17 02:28:45 okan Exp $ + * $OpenBSD: xutil.c,v 1.51 2012/12/17 18:34:06 okan Exp $ */ #include @@ -422,8 +422,7 @@ xu_getcolor(struct screen_ctx *sc, char *name) { XColor color, tmp; - if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which), - name, &color, &tmp)) { + if (!XAllocNamedColor(X_Dpy, sc->colormap, name, &color, &tmp)) { warnx("XAllocNamedColor error: '%s'", name); return (0); } -- cgit v1.2.3-2-gb3c3