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.46 by root, Wed Feb 1 18:36:48 2006 UTC vs.
Revision 1.48 by root, Thu Feb 2 12:51:22 2006 UTC

398{ 398{
399 // TODO: somehow check wether the database files/resources changed 399 // TODO: somehow check wether the database files/resources changed
400 // before affording re-loading/parsing 400 // before affording re-loading/parsing
401 XrmDestroyDatabase (XrmGetDatabase (display)); 401 XrmDestroyDatabase (XrmGetDatabase (display));
402 XrmSetDatabase (display, get_resources ()); 402 XrmSetDatabase (display, get_resources ());
403 printf ("next\n");//D
404} 403}
405 404
406rxvt_display::~rxvt_display () 405rxvt_display::~rxvt_display ()
407{ 406{
408 if (!display) 407 if (!display)
568rxvt_color::alloc (rxvt_screen *screen, const rgba &color) 567rxvt_color::alloc (rxvt_screen *screen, const rgba &color)
569{ 568{
570#if XFT 569#if XFT
571 XRenderPictFormat *format; 570 XRenderPictFormat *format;
572 571
573 // FUCKING Xft gets it wrong, of course, so work around it 572 // FUCKING Xft gets it wrong, of course, so work around it.
574 // transparency users should eat shit and die, and then 573 // Transparency users should eat shit and die, and then
575 // XRenderQueryPictIndexValues themselves plenty. 574 // XRenderQueryPictIndexValues themselves plenty.
576 if ((screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor) 575 if ((screen->visual->c_class == TrueColor)
577 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual))) 576 && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual)))
578 { 577 {
579 // the fun lies in doing everything manually... 578 // the fun lies in doing everything manually...
580 c.color.red = color.r; 579 c.color.red = color.r;
581 c.color.green = color.g; 580 c.color.green = color.g;
603#else 602#else
604 c.red = color.r; 603 c.red = color.r;
605 c.green = color.g; 604 c.green = color.g;
606 c.blue = color.b; 605 c.blue = color.b;
607 606
608 if (screen->visual->c_class == TrueColor || screen->visual->c_class == DirectColor) 607 if (screen->visual->c_class == TrueColor)
609 { 608 {
610 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 ))
611 / rgba::MAX_CC) << ctz (screen->visual->red_mask ) 610 / rgba::MAX_CC) << ctz (screen->visual->red_mask )
612 | (color.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask)) 611 | (color.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask))
613 / 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