… | |
… | |
30 | |
30 | |
31 | #include <inttypes.h> |
31 | #include <inttypes.h> |
32 | |
32 | |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
33 | #include "salloc.C" // HACK, should be a seperate compile! |
34 | |
34 | |
|
|
35 | static inline void |
35 | static inline void fill_text (text_t *start, text_t value, int len) |
36 | fill_text (text_t *start, text_t value, int len) |
36 | { |
37 | { |
37 | while (len--) |
38 | while (len--) |
38 | *start++ = value; |
39 | *start++ = value; |
39 | } |
40 | } |
40 | |
41 | |
… | |
… | |
2976 | if (display->clipboard_owner == this) |
2977 | if (display->clipboard_owner == this) |
2977 | display->clipboard_owner = 0; |
2978 | display->clipboard_owner = 0; |
2978 | } |
2979 | } |
2979 | } |
2980 | } |
2980 | |
2981 | |
2981 | void |
|
|
2982 | rxvt_term::clipboard_copy (Time tm) |
|
|
2983 | { |
|
|
2984 | if (selection.len > 0) |
|
|
2985 | { |
|
|
2986 | free (selection.clip_text); |
|
|
2987 | selection.clip_len = selection.len; |
|
|
2988 | selection.clip_text = (wchar_t *) malloc (sizeof (wchar_t) * selection.clip_len); |
|
|
2989 | memcpy (selection.clip_text, selection.text, |
|
|
2990 | sizeof (wchar_t) * selection.clip_len); |
|
|
2991 | selection_grab (tm, true); |
|
|
2992 | } |
|
|
2993 | } |
|
|
2994 | |
|
|
2995 | /* ------------------------------------------------------------------------- */ |
2982 | /* ------------------------------------------------------------------------- */ |
2996 | /* |
2983 | /* |
2997 | * Copy a selection into the cut buffer |
2984 | * Copy a selection into the cut buffer |
2998 | * EXT: button 1 or 3 release |
2985 | * EXT: button 1 or 3 release |
2999 | */ |
2986 | */ |