New feature in feature.h: FAKE_SELECTION.
Disables the use of XmbTextListToTextProperty for STRING selection
target. (Workaround as currently there's no way to cut'n'paste
non-iso8859-1 text.)
Marius Gedminas
--
Ambition is a poor excuse for not having enough sense to be lazy.
Index: src/feature.h
===================================================================
RCS file: /cvsroot/rxvt/rxvt/src/feature.h,v
retrieving revision 1.52
diff -u -r1.52 feature.h
--- src/feature.h 2001/03/02 05:33:15 1.52
+++ src/feature.h 2001/03/06 12:54:18
@@ -255,6 +281,12 @@
*/
/* #define SCROLLBAR_INITIAL_DELAY 40 */
/* #define SCROLLBAR_CONTINUOUS_DELAY 2 */
+
+/*
+ * Fake selection charset for XA_STRING target (that is, perform no
+ * transformations at all) -- mg
+ */
+#define FAKE_SELECTION
/*--------------------------------MISC----------------------------------*/
/*
Index: src/screen.c
===================================================================
RCS file: /cvsroot/rxvt/rxvt/src/screen.c,v
retrieving revision 1.197
diff -u -r1.197 screen.c
--- src/screen.c 2001/03/06 05:04:28 1.197
+++ src/screen.c 2001/03/06 12:54:27
@@ -3475,7 +3497,17 @@
cl[0] = dummy;
*dummy = '\0';
}
+#ifdef FAKE_SELECTION
+ if (style == XStringStyle) {
+ ct.value = cl[0];
+ ct.encoding = XA_STRING;
+ ct.format = 8;
+ ct.nitems = r->selection.len;
+ } else
+ XmbTextListToTextProperty(r->Xdisplay, cl, 1, style, &ct);
+#else
XmbTextListToTextProperty(r->Xdisplay, cl, 1, style, &ct);
+#endif
XChangeProperty(r->Xdisplay, rq->requestor, rq->property,
target, 8, PropModeReplace,
ct.value, (int)ct.nitems);