From 8cd13fe96e547e7841584da18e9d2f2378c85d3d Mon Sep 17 00:00:00 2001 From: kojima Date: Tue, 16 Nov 1999 01:53:43 +0000 Subject: [PATCH] few more fixes to std colormap code --- src/screen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/screen.c b/src/screen.c index 334f618d..d83e273d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -753,7 +753,18 @@ wScreenInit(int screen_number) rattr.flags |= RC_VisualID; rattr.visualid = wVisualID; } + scr->rcontext = RCreateContext(dpy, screen_number, &rattr); + + if (!scr->rcontext && RErrorCode == RERR_STDCMAPFAIL) { + wwarning(RMessageForError(RErrorCode)); + + rattr.flags &= ~RC_StandardColormap; + rattr.standard_colormap_mode = RUseStdColormap; + + scr->rcontext = RCreateContext(dpy, screen_number, &rattr); + } + if (!scr->rcontext) { wwarning(_("could not initialize graphics library context: %s"), RMessageForError(RErrorCode));