… | |
… | |
449 | return false; |
449 | return false; |
450 | |
450 | |
451 | screen = DefaultScreen (dpy); |
451 | screen = DefaultScreen (dpy); |
452 | root = DefaultRootWindow (dpy); |
452 | root = DefaultRootWindow (dpy); |
453 | |
453 | |
454 | assert (ARRAY_LENGTH(xa_names) == NUM_XA); |
454 | assert (ecb_array_length (xa_names) == NUM_XA); |
455 | XInternAtoms (dpy, (char **)xa_names, NUM_XA, False, xa); |
455 | XInternAtoms (dpy, (char **)xa_names, NUM_XA, False, xa); |
456 | |
456 | |
457 | XrmSetDatabase (dpy, get_resources (false)); |
457 | XrmSetDatabase (dpy, get_resources (false)); |
458 | |
458 | |
459 | #ifdef POINTER_BLANK |
459 | #ifdef POINTER_BLANK |
… | |
… | |
734 | c.green = color.g; |
734 | c.green = color.g; |
735 | c.blue = color.b; |
735 | c.blue = color.b; |
736 | |
736 | |
737 | if (screen->visual->c_class == TrueColor) |
737 | if (screen->visual->c_class == TrueColor) |
738 | { |
738 | { |
739 | c.pixel = (color.r >> (16 - rxvt_popcount (screen->visual->red_mask )) << rxvt_ctz (screen->visual->red_mask )) |
739 | c.pixel = (color.r >> (16 - ecb_popcount32 (screen->visual->red_mask )) << ecb_ctz32 (screen->visual->red_mask )) |
740 | | (color.g >> (16 - rxvt_popcount (screen->visual->green_mask)) << rxvt_ctz (screen->visual->green_mask)) |
740 | | (color.g >> (16 - ecb_popcount32 (screen->visual->green_mask)) << ecb_ctz32 (screen->visual->green_mask)) |
741 | | (color.b >> (16 - rxvt_popcount (screen->visual->blue_mask )) << rxvt_ctz (screen->visual->blue_mask )); |
741 | | (color.b >> (16 - ecb_popcount32 (screen->visual->blue_mask )) << ecb_ctz32 (screen->visual->blue_mask )); |
742 | |
742 | |
743 | return true; |
743 | return true; |
744 | } |
744 | } |
745 | else if (XAllocColor (screen->dpy, screen->cmap, &c)) |
745 | else if (XAllocColor (screen->dpy, screen->cmap, &c)) |
746 | return true; |
746 | return true; |