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.35 by root, Mon Jan 30 16:12:58 2006 UTC vs.
Revision 1.37 by root, Mon Jan 30 17:49:48 2006 UTC

603 XRenderPictFormat *format; 603 XRenderPictFormat *format;
604 604
605 // FUCKING Xft gets it wrong, of course, so work around it 605 // FUCKING Xft gets it wrong, of course, so work around it
606 // transparency users should eat shit and die, and then 606 // transparency users should eat shit and die, and then
607 // XRenderQueryPictIndexValues themselves plenty. 607 // XRenderQueryPictIndexValues themselves plenty.
608 if (screen->visual->c_class == TrueColor 608 if ((screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor)
609 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual))) 609 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual)))
610 { 610 {
611 // the fun lies in doing everything manually... 611 // the fun lies in doing everything manually...
612 c.color.red = rgba.r; 612 c.color.red = rgba.r;
613 c.color.green = rgba.g; 613 c.color.green = rgba.g;
633 return XftColorAllocValue (screen->xdisp, screen->visual, screen->cmap, &d, &c); 633 return XftColorAllocValue (screen->xdisp, screen->visual, screen->cmap, &d, &c);
634 } 634 }
635 635
636 return false; 636 return false;
637#else 637#else
638 if (screen->visual->c_class == TrueColor) 638 if (screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor)
639 { 639 {
640 p = (rgba.r * (screen->visual->red_mask >> ctz (screen->visual->red_mask )) 640 p = (rgba.r * (screen->visual->red_mask >> ctz (screen->visual->red_mask ))
641 / rxvt_rgba::MAX_CC) << ctz (screen->visual->red_mask ) 641 / rxvt_rgba::MAX_CC) << ctz (screen->visual->red_mask )
642 | (rgba.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask)) 642 | (rgba.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask))
643 / rxvt_rgba::MAX_CC) << ctz (screen->visual->green_mask) 643 / rxvt_rgba::MAX_CC) << ctz (screen->visual->green_mask)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines