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.47 by root, Thu Feb 2 00:31:47 2006 UTC vs.
Revision 1.48 by root, Thu Feb 2 12:51:22 2006 UTC

567rxvt_color::alloc (rxvt_screen *screen, const rgba &color) 567rxvt_color::alloc (rxvt_screen *screen, const rgba &color)
568{ 568{
569#if XFT 569#if XFT
570 XRenderPictFormat *format; 570 XRenderPictFormat *format;
571 571
572 // FUCKING Xft gets it wrong, of course, so work around it 572 // FUCKING Xft gets it wrong, of course, so work around it.
573 // transparency users should eat shit and die, and then 573 // Transparency users should eat shit and die, and then
574 // XRenderQueryPictIndexValues themselves plenty. 574 // XRenderQueryPictIndexValues themselves plenty.
575 if ((screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor) 575 if ((screen->visual->c_class == TrueColor)
576 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual))) 576 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual)))
577 { 577 {
578 // the fun lies in doing everything manually... 578 // the fun lies in doing everything manually...
579 c.color.red = color.r; 579 c.color.red = color.r;
580 c.color.green = color.g; 580 c.color.green = color.g;
602#else 602#else
603 c.red = color.r; 603 c.red = color.r;
604 c.green = color.g; 604 c.green = color.g;
605 c.blue = color.b; 605 c.blue = color.b;
606 606
607 if (screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor) 607 if (screen->visual->c_class == TrueColor)
608 { 608 {
609 c.pixel = (color.r * (screen->visual->red_mask >> ctz (screen->visual->red_mask )) 609 c.pixel = (color.r * (screen->visual->red_mask >> ctz (screen->visual->red_mask ))
610 / rgba::MAX_CC) << ctz (screen->visual->red_mask ) 610 / rgba::MAX_CC) << ctz (screen->visual->red_mask )
611 | (color.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask)) 611 | (color.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask))
612 / rgba::MAX_CC) << ctz (screen->visual->green_mask) 612 / rgba::MAX_CC) << ctz (screen->visual->green_mask)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines