diff options
| author | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2015-03-15 18:07:46 +0000 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2015-03-15 18:07:46 +0000 |
| commit | 86d1e432a823dad7bb64808b8192014fddc8cd9f (patch) | |
| tree | 000ed6d83fca547f1f27bd05728afd847f6d1a1b | |
| parent | c7e24e44c8d66cd5b0a6b015d2112da5f1e4e581 (diff) | |
| download | st-86d1e432a823dad7bb64808b8192014fddc8cd9f.tar.gz st-86d1e432a823dad7bb64808b8192014fddc8cd9f.zip | |
Support XA_STRING in notify request
Some programs can only deal with XA_STRING, and it makes impossible st
be able of copying to them. This patch makes st answer also to XA_STRING,
althought it sends utf8 strings. It is not a problem because moderm
applications must support utf8.
| -rw-r--r-- | st.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1089,7 +1089,11 @@ selrequest(XEvent *e) { | |||
| 1089 | XA_ATOM, 32, PropModeReplace, | 1089 | XA_ATOM, 32, PropModeReplace, |
| 1090 | (uchar *) &string, 1); | 1090 | (uchar *) &string, 1); |
| 1091 | xev.property = xsre->property; | 1091 | xev.property = xsre->property; |
| 1092 | } else if(xsre->target == sel.xtarget) { | 1092 | } else if(xsre->target == sel.xtarget || xsre->target == XA_STRING) { |
| 1093 | /* | ||
| 1094 | * xith XA_STRING non ascii characters may be incorrect in the | ||
| 1095 | * requestor. It is not our problem, use utf8. | ||
| 1096 | */ | ||
| 1093 | clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); | 1097 | clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0); |
| 1094 | if(xsre->selection == XA_PRIMARY) { | 1098 | if(xsre->selection == XA_PRIMARY) { |
| 1095 | seltext = sel.primary; | 1099 | seltext = sel.primary; |
