… | |
… | |
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; |
… | |
… | |
911 | |
911 | |
912 | incr_buf = 0; |
912 | incr_buf = 0; |
913 | incr_buf_size = incr_buf_fill = 0; |
913 | incr_buf_size = incr_buf_fill = 0; |
914 | selection_wait = Sel_normal; |
914 | selection_wait = Sel_normal; |
915 | selection_type = selnum; |
915 | selection_type = selnum; |
|
|
916 | cb_sv = 0; |
916 | } |
917 | } |
917 | |
918 | |
918 | void |
919 | void |
919 | rxvt_selection::stop () |
920 | rxvt_selection::stop () |
920 | { |
921 | { |
… | |
… | |
960 | } |
961 | } |
961 | |
962 | |
962 | void |
963 | void |
963 | rxvt_selection::finish (char *data, unsigned int len) |
964 | rxvt_selection::finish (char *data, unsigned int len) |
964 | { |
965 | { |
965 | if (term) |
966 | if (!cb_sv) |
966 | { |
967 | { |
967 | if (data) |
968 | if (data) |
968 | term->paste (data, len); |
969 | term->paste (data, len); |
969 | |
970 | |
970 | term->selection_req = 0; |
971 | term->selection_req = 0; |