or changed rxvt behaviour to make it more compatible to xterm (usually
xfree86's xterm).
-TODO: configurable underline line colour.
TODO: read property sequence is broken with respect to utf-8 etc.
FEAT: hotkey font resizing
FEAT: searchable backlog
- fix atom name enumeration.
- streamline atom and xft color allocation to reduce startup
time (12.8s -> 7.8s on my dsl). Still, doing it with only 2-3
- turnarounds would be much faster, but impossible to implement.
+ turnarounds would be much faster, but impossible to implement(?).
- do not use XSETROOTPMAP_ID anymore, support ESETROOT_PMAP_ID
instead.
- implement underlineColor resource when ENABLE_FRILLS.
Use the specified colour as the background for reverse video
characters.
+=item B<underlineColor:> I<colour>
+
+If set, use the specified colour as the colour for the underline
+itself. If unset, use the foreground colour.
+
=item B<cursorColor:> I<colour>
Use the specified colour for the cursor. The default is to use the
* if user used some Esetroot compatible prog to set the root bg,
* use the property to determine the pixmap. We use it later on.
*/
- if (xa[XA_XROOTPMAPID] == 0)
- xa[XA_XROOTPMAPID] = XInternAtom (display->display, "_XROOTPMAP_ID", False);
-
- if (ev.xproperty.atom != xa[XA_XROOTPMAPID])
+ if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
+ || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
return;
/* FALLTHROUGH */
* the root background. Some window managers put multiple nested frame
* windows for each client, so we have to take care about that.
*/
- i = (xa[XA_XROOTPMAPID]
- && XGetWindowProperty (display->display, display->root, xa[XA_XROOTPMAPID],
+ i = (xa[XA_XROOTPMAP_ID]
+ && XGetWindowProperty (display->display, display->root, xa[XA_XROOTPMAP_ID],
0L, 1L, False, XA_PIXMAP, &atype, &aformat,
&nitems, &bytes_after, &prop) == Success);
if (!i || prop == NULL)
- i = (xa[XA_XSETROOTID]
- && XGetWindowProperty (display->display, display->root, xa[XA_XSETROOTID],
+ i = (xa[XA_ESETROOT_PMAP_ID]
+ && XGetWindowProperty (display->display, display->root, xa[XA_ESETROOT_PMAP_ID],
0L, 1L, False, XA_PIXMAP, &atype, &aformat,
&nitems, &bytes_after, &prop) == Success);
NULL, /* Color_UL */
NULL, /* Color_RV */
#endif /* ! NO_BOLD_UNDERLINE_REVERSE */
+#if ENABLE_FRILLS
+ NULL, // Color_underline
+#endif
#ifdef OPTION_HC
NULL,
#endif
#endif
#ifdef TRANSPARENT
"_XROOTPMAP_ID",
- "_XSETROOT_ID",
+ "ESETROOT_PMAP_ID",
#endif
#ifdef OFFIX_DND
"DndProtocol",
}
/*----------------------------------------------------------------------*/
-/*
- * Colour determination for low colour displays, routine from
- * Hans de Goede <hans@highrise.nl>
- */
int
rxvt_term::rXParseAllocColor (rxvt_color *screen_in_out, const char *colour)
Color_UL,
Color_RV,
#endif
+#if ENABLE_FRILLS
+ Color_underline,
+#endif
#ifdef OPTION_HC
Color_HC,
#endif
XA_WM_LOCALE_NAME,
#endif
#if TRANSPARENT
- XA_XROOTPMAPID,
- XA_XSETROOTID,
+ XA_XROOTPMAP_ID,
+ XA_ESETROOT_PMAP_ID,
#endif
#if OFFIX_DND /* OffiX Dnd (drag 'n' drop) support */
XA_DNDPROTOCOL,
bool
rxvt_color::set (rxvt_display *display, const char *name)
{
+#if XFT
+ return XftColorAllocName (display->display, display->visual, display->cmap,
+ name, &c);
+#else
XColor xc;
if (XParseColor (display->display, display->cmap, name, &xc))
return set (display, xc.red, xc.green, xc.blue);
return false;
+#endif
}
bool
operator Display *() const { return display; }
void flush ();
-
+ Atom atom (const char *name);
void set_selection_owner (rxvt_term *owner);
void reg (xevent_watcher *w);
rxvt_xim *get_xim (const char *locale, const char *modifiers);
void put_xim (rxvt_xim *xim);
#endif
-
- Atom atom (const char *name);
};
#ifdef USE_XIM
if (rend & RS_Uline && font->descent > 1 && fore != back)
{
- XSetForeground (display->display, TermWin.gc, pix_colors[fore]);
+#if ENABLE_FRILLS
+ if (ISSET_PIXCOLOR (Color_underline))
+ XSetForeground (display->display, TermWin.gc, pix_colors[Color_underline]);
+ else
+#endif
+ 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);
RSTRG (Rs_color + Color_UL, "colorUL", "color"),
RSTRG (Rs_color + Color_RV, "colorRV", "color"),
#endif /* ! NO_BOLD_UNDERLINE_REVERSE */
+#if ENABLE_FRILLS
+ RSTRG (Rs_color + Color_underline, "underlineColor", "color"),
+#endif
#ifdef KEEP_SCROLLCOLOR
RSTRG (Rs_color + Color_scroll, "scrollColor", "color"),
RSTRG (Rs_color + Color_trough, "troughColor", "color"),