slightly modified the UTF8 patch, nothing changed, only added the XA_STRING
conditional block for code politeness/readability.
P.S. Pasting huge blocks of text using Eterm now is noticeably faster,
before I was experiencing random delays.
I suspect these were related to lack of UTF8 handling,
or generally to retries by the requestors.
--- screen.c 2010-07-29 22:54:14.000000000 +0200
+++ screen.c 2010-07-31 21:07:36.000000000 +0200
@@ -3345,16 +3345,23 @@
(sizeof(target_list) / sizeof(target_list[0])));
ev.xselection.property = rq->property;
#if defined(MULTI_CHARSET) && defined(HAVE_X11_XMU_ATOMS_H)
- } else if (rq->target == XA_TEXT(Xdisplay) ||
- rq->target == XA_COMPOUND_TEXT(Xdisplay)) {
+ } else if (rq->target == XA_TEXT(Xdisplay) ||
+ rq->target == XA_COMPOUND_TEXT(Xdisplay) ||
+ rq->target == XA_UTF8_STRING(Xdisplay)) {
XTextProperty xtextp;
char *l[1];
*l = selection.text;
xtextp.value = NULL;
xtextp.nitems = 0;
- if (XmbTextListToTextProperty(Xdisplay, l, 1,
- XCompoundTextStyle, &xtextp) == Success) {
+ int style = XCompoundTextStyle;
+ Atom working_target = XA_COMPOUND_TEXT(Xdisplay);
+ if(rq->target == XA_UTF8_STRING(Xdisplay)) {
+ style = XUTF8StringStyle;
+ working_target = rq->target;
+ }
+ if (XmbTextListToTextProperty(Xdisplay, l, 1,
+ style, &xtextp) == Success) {
if (xtextp.nitems > 0 && xtextp.value != NULL) {
- XChangeProperty(Xdisplay, rq->requestor, rq->property,
- XA_COMPOUND_TEXT(Xdisplay),
+ XChangeProperty(Xdisplay, rq->requestor, rq->property,
+ working_target,
8, PropModeReplace, xtextp.value, xtextp.nitems);
ev.xselection.property = rq->property;
}
@@ -3363,6 +3370,9 @@
} else if (rq->target == XA_STRING) {
XChangeProperty(Xdisplay, rq->requestor, rq->property, rq->target,
8, PropModeReplace, selection.text, selection.len);
ev.xselection.property = rq->property;
+ } else {
+ XChangeProperty(Xdisplay, rq->requestor, rq->property, XA_STRING,
+ 8, PropModeReplace, selection.text, selection.len);
+ ev.xselection.property = rq->property;
}
XSendEvent(Xdisplay, rq->requestor, False, 0, &ev);
}
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel