… | |
… | |
2743 | * EXT: button 2 release |
2743 | * EXT: button 2 release |
2744 | */ |
2744 | */ |
2745 | void |
2745 | void |
2746 | rxvt_term::selection_request (Time tm, int selnum) NOTHROW |
2746 | rxvt_term::selection_request (Time tm, int selnum) NOTHROW |
2747 | { |
2747 | { |
2748 | if (selection.text && selnum == Sel_Primary) |
|
|
2749 | { |
|
|
2750 | /* internal selection */ |
|
|
2751 | char *str = rxvt_wcstombs (selection.text, selection.len); |
|
|
2752 | paste (str, strlen (str)); |
|
|
2753 | free (str); |
|
|
2754 | } |
|
|
2755 | else if (!selection_req) |
2748 | if (!selection_req) |
2756 | { |
2749 | { |
2757 | selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], this); |
2750 | selection_req = new rxvt_selection (display, selnum, tm, vt, xa[XA_VT_SELECTION], this); |
2758 | selection_req->run (); |
2751 | selection_req->run (); |
2759 | } |
2752 | } |
2760 | } |
2753 | } |