- implemented caching of input methods. This immensely shortens
startup time for new terms in rxvtd. At least xfree86 4.3 is
rather broken with respect to input methods, though, so expect
- crashes when you kill your input method (xterm crashes, too).
+ crashes when you kill your input method (xterm et al. also crash).
- fix bugs in x flushing, causing an empty screen after startup
- the first until the first event arives.
- fix various memleaks in rxvtd.
+ - countless minor bugfixes.
1.8 Mon Feb 2 20:09:18 CET 2004
- almost total conversion to C++. Except for introducing
return *cmdbuf_ptr++;
wchar_t wc;
- size_t len = mbrtowc (&wc, (char *)cmdbuf_ptr, cmdbuf_endp - cmdbuf_ptr, &mbstate.mbs);
+ size_t len = mbrtowc (&wc, (char *)cmdbuf_ptr, cmdbuf_endp - cmdbuf_ptr, mbstate);
if (len == (size_t)-2)
return NOCHAR;
XftUnlockFace (f);
- d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap);
- if (!d)
- return false;
-
return true;
}
const text_t *text, int len,
int fg, int bg)
{
+ d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap);
+
if (bg >= 0 && bg != Color_bg)
XftDrawRect (d, &r->PixColors[bg].c, x, y, r->TermWin.fwidth * len, r->TermWin.fheight);
else
#if HAVE_XSETLOCALE || HAVE_SETLOCALE
free (this->locale);
this->locale = rxvt_strdup (setlocale (LC_CTYPE, ""));
+ rxvt_set_locale (this->locale);
+ mbstate.reset ();
#endif
#if HAVE_NL_LANGINFO
free (codeset);
-/*--------------------------------*-C-*---------------------------------*
+/*--------------------------------*-C-*---------------------------------*;
* File: main.c
*----------------------------------------------------------------------*
*
Gr_reset (); /* reset graphics */
#endif
-#if 1
+#if 0
XSynchronize (display->display, True);
#endif
#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
if (rs[Rs_imLocale])
- setlocale (LC_CTYPE, rs[Rs_imLocale]);
+ rxvt_set_locale (rs[Rs_imLocale]);
#endif
p = rs[Rs_inputMethod];
done:
#if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE)
if (rs[Rs_imLocale])
- setlocale (LC_CTYPE, locale);
+ rxvt_set_locale (locale);
#endif
}
struct mbstate {
mbstate_t mbs;
- mbstate ()
- {
- MEMSET (&mbs, 0, sizeof (mbs));
- }
+ operator mbstate_t *() { return &mbs; }
+ void reset () { MEMSET (&mbs, 0, sizeof (mbs)); }
+ mbstate () { reset (); }
};
struct rxvt_term : rxvt_vars {
#if XFT
XftColorFree (display->display, display->visual, display->cmap, &c);
#else
- XFreeColors (display->display, display->cmap, &c, 1, AllPlanes);
+ XFreeColors (display->display, display->cmap, &p, 1, AllPlanes);
#endif
}