ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvttoolkit.C
(Generate patch)

Comparing rxvt-unicode/src/rxvttoolkit.C (file contents):
Revision 1.136 by root, Wed Jun 6 20:22:04 2012 UTC vs.
Revision 1.137 by root, Thu Jun 7 16:04:31 2012 UTC

260 depth = DefaultDepthOfScreen (screen); 260 depth = DefaultDepthOfScreen (screen);
261 visual = DefaultVisualOfScreen (screen); 261 visual = DefaultVisualOfScreen (screen);
262 cmap = DefaultColormapOfScreen (screen); 262 cmap = DefaultColormapOfScreen (screen);
263} 263}
264 264
265#if ENABLE_FRILLS
266
265void 267void
266rxvt_screen::select_visual (int bitdepth) 268rxvt_screen::select_visual (int id)
267{ 269{
268#if XFT
269 XVisualInfo vinfo; 270 XVisualInfo vinfo;
271 vinfo.visualid = id;
272 int n;
273
274 if (XVisualInfo *vi = XGetVisualInfo (dpy, VisualIDMask, &vinfo, &n))
275 {
276 depth = vi->depth;
277 visual = vi->visual;
278
279 XFree (vi);
280
281 cmap = XCreateColormap (dpy, display->root, visual, AllocNone);
282 }
283 else
284 rxvt_warn ("cannot requested visual id 0x%02x, using default visual.\n", id);
285}
286
287void
288rxvt_screen::select_depth (int bitdepth)
289{
290 XVisualInfo vinfo;
270 291
271 if (XMatchVisualInfo (dpy, display->screen, bitdepth, TrueColor, &vinfo)) 292 if (XMatchVisualInfo (dpy, display->screen, bitdepth, TrueColor, &vinfo))
272 {
273 depth = bitdepth;
274 visual = vinfo.visual; 293 select_visual (vinfo.visualid);
275 cmap = XCreateColormap (dpy, display->root, visual, AllocNone); 294 else
276 } 295 rxvt_warn ("no visual found for requested depth %d, using default visual.\n", bitdepth);
277#endif
278} 296}
297
298#endif
279 299
280void 300void
281rxvt_screen::clear () 301rxvt_screen::clear ()
282{ 302{
283#if XFT 303#if XFT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines