or changed rxvt behaviour to make it more compatible to xterm (usually
xfree86's xterm).
-TODO: hotkey font resizing
+TODO: underline colour changes?
+TODO: read property sequence is broken with respect to utf-8 etc.
TODO: +ssc -ssr seems to scroll at wrong time, scrolling up the empty sec. scr.
-TODO: multibyte support for setwmname et al.
-TODO: tabbed windows
-TODO: there are other todo items, but they are not in this file.
-TODO: OnTheSpot editing.
-TODO: searchable backlog
-TODO: meta-tagging of data by regex (my dream project)
-TODO: triple-click == select full output line
-TODO: double-click: more intelligent (urls etc.)
+FEAT: hotkey font resizing
+FEAT: searchable backlog
+FEAT: meta-tagging of data by regex (my dream project)
+FEAT: triple-click == select full output line
+FEAT: double-click: more intelligent (urls etc.)
+FEAT: OnTheSpot editing.
+FEAT: tabbed windows
+
+4.4
+ - rewrote handling of default-char width.
+ - implement _NET_WM_NAME et al., and also use UTF8_STRING
+ for the xterm property esc. sequence. Allows i18n window
+ titles etc.
+ - SMART_WINDOW_TITLE removed, pls. complain if you need this.
+ - added GBK encoding (formidable patch by WU Fengguang).
+ - fixed a bug in the transparency code.
+ - upgraded iom.[Ch].
+ - force slower (but more responsive) transparency update.
+ - fix off-by-one bug with wide characters at the end of a line,
+ which got partially overwritten by spaces.
+ - as xlib is completely broken with respect to utf-8 handling
+ and nobody is going to fix it, that part has been re-implemented.
+ should fix most paste problems between apps that use UTF8 encoding
+ and rxvt running in a lesser-supported locale (thanks to Robin Redeker
+ for writing utf8towcs). Only enabled with ENABLE_FRILLS.
+ - darwin compile fix by Ethan Blanton.
+ - fix the colour of the underline, which was rather random before.
4.3 Sat Dec 4 04:58:37 CET 2004
- unapply the "emulated graphical chars. respect wcwidth" patch.
now, too.
4.2 Wed Dec 1 03:30:22 CET 2004
- - make emulated graphical characters respect wcwidth
- (forgot who reported this).
+ - make emulated graphical characters respect wcwidth (Kuang-che Wu).
- remove debugging code that caused major slowdowns
on high-latency networks.
- wide characters shift the correct number of characters
while (--width > 0);
// pad with spaces when overwriting wide character with smaller one
- for (int c = screen.cur.col; c < last_col && stp[c] == NOCHAR; c++)
- {
- stp[c] = ' ';
- srp[c] = rend;
- }
+ if (!width)
+ for (int c = screen.cur.col; c < last_col && stp[c] == NOCHAR; c++)
+ {
+ stp[c] = ' ';
+ srp[c] = rend;
+ }
}
else if (width == 0)
{
font->draw (*TermWin.drawable, xpixel, ypixel, text, count, fore, back);
if (rend & RS_Uline && font->descent > 1 && fore != back)
- XDrawLine (display->display, drawBuffer, TermWin.gc,
- xpixel, ypixel + font->ascent + 1,
- xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
+ {
+ XSetForeground (display->display, TermWin.gc, pix_colors[fore]);
+ XDrawLine (display->display, drawBuffer, TermWin.gc,
+ xpixel, ypixel + font->ascent + 1,
+ xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1);
+ }
} /* for (col....) */
} /* for (row....) */
char **cl;
int cr;
+
+#if ENABLE_FRILLS
+ // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it
+ // so recode it manually
+ if (ct.encoding == xa[XA_UTF8_STRING])
+ {
+ wchar_t *w = rxvt_utf8towcs ((const char *)ct.value, ct.nitems);
+ char *s = rxvt_wcstombs (w);
+
+ // TODO: strlen == only the first element will be converted. well...
+ paste ((unsigned char *)s, strlen (s));
+
+ free (s);
+ free (w);
+ }
+ else
+#endif
if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 && cl)
{
for (int i = 0; i < cr; i++)
if (selection_request_other (xa[XA_COMPOUND_TEXT], i))
return;
#endif
-
}
}
if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0)
{
- XChangeProperty (display->display, display->root, XA_CUT_BUFFER0, XA_STRING, 8,
- PropModeReplace, ct.value, ct.nitems);
+ set_string_property (XA_CUT_BUFFER0, ct.value, ct.nitems);
XFree (ct.value);
}
#endif
rxvt_term::selection_send (const XSelectionRequestEvent &rq)
{
XSelectionEvent ev;
- XTextProperty ct;
- XICCEncodingStyle style;
- Atom target;
ev.type = SelectionNotify;
ev.property = None;
|| rq.target == xa[XA_UTF8_STRING]
)
{
+ XTextProperty ct;
+ Atom target = rq.target;
short freect = 0;
int selectlen;
wchar_t *cl;
-
- target = rq.target;
+ enum {
+ enc_string = XStringStyle,
+ enc_text = XStdICCTextStyle,
+ enc_compound_text = XCompoundTextStyle,
+#ifdef X_HAVE_UTF8_STRING
+ enc_utf8 = XUTF8StringStyle,
+#else
+ enc_utf8 = -1,
+#endif
+ } style;
if (target == XA_STRING)
// we actually don't do XA_STRING, but who cares, as i18n clients
// will ask for another format anyways.
- style = XStringStyle;
+ style = enc_string;
else if (target == xa[XA_TEXT])
- style = XStdICCTextStyle;
+ style = enc_text;
else if (target == xa[XA_COMPOUND_TEXT])
- style = XCompoundTextStyle;
-#if X_HAVE_UTF8_STRING
+ style = enc_compound_text;
+#if ENABLE_FRILLS
else if (target == xa[XA_UTF8_STRING])
- style = XUTF8StringStyle;
+ style = enc_utf8;
#endif
else
{
target = xa[XA_COMPOUND_TEXT];
- style = XCompoundTextStyle;
+ style = enc_compound_text;
}
if (selection.text)
selectlen = 0;
}
- // Xwc doesn't handle iso-10646 in wchar_t gracefully, so maybe recode it
- // manually for XUTF8StringStyle.
- if (XwcTextListToTextProperty (display->display, &cl, 1, style, &ct) >= 0)
+#if ENABLE_FRILLS
+ // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it
+ // so recode it manually
+ if (style == enc_utf8)
+ {
+ freect = 1;
+ ct.encoding = target;
+ ct.format = 8;
+ ct.value = (unsigned char *)rxvt_wcstoutf8 (cl, selectlen);
+ ct.nitems = strlen ((char *)ct.value);
+ }
+ else
+#endif
+ if (XwcTextListToTextProperty (display->display, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0)
freect = 1;
else
{
/* if we failed to convert then send it raw */
ct.value = (unsigned char *)cl;
ct.nitems = selectlen;
+ ct.encoding = target;
}
XChangeProperty (display->display, rq.requestor, rq.property,
- target, 8, PropModeReplace,
+ ct.encoding, 8, PropModeReplace,
ct.value, (int)ct.nitems);
ev.property = rq.property;