comparison src/xfns.c @ 107839:117dfaee55b8

xfns.c (select_visual): Don't call error if XGetVisualInfo returns more than one visual (Bug#5938).
author Jan D. <jan.h.d@swipnet.se>
date Mon, 12 Apr 2010 20:58:15 +0200
parents 834292200403
children 686c788ffbb6
comparison
equal deleted inserted replaced
107838:f50f5478ec53 107839:117dfaee55b8
4127 4127
4128 vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual); 4128 vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual);
4129 vinfo_template.screen = XScreenNumberOfScreen (screen); 4129 vinfo_template.screen = XScreenNumberOfScreen (screen);
4130 vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask, 4130 vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask,
4131 &vinfo_template, &n_visuals); 4131 &vinfo_template, &n_visuals);
4132 if (n_visuals != 1) 4132 if (n_visuals <= 0)
4133 fatal ("Can't get proper X visual info"); 4133 fatal ("Can't get proper X visual info");
4134 4134
4135 dpyinfo->n_planes = vinfo->depth; 4135 dpyinfo->n_planes = vinfo->depth;
4136 XFree ((char *) vinfo); 4136 XFree ((char *) vinfo);
4137 } 4137 }