From: pcg Date: Sat, 21 Feb 2004 20:33:39 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=a6749bc3355046b3115e150540d0e2b1c317b5a3;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/Changes b/Changes index 54c1ac44..7e48e338 100644 --- a/Changes +++ b/Changes @@ -5,10 +5,10 @@ - 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 diff --git a/src/command.C b/src/command.C index 54c1e1a8..0e0a6956 100644 --- a/src/command.C +++ b/src/command.C @@ -949,7 +949,7 @@ rxvt_term::next_char () 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; diff --git a/src/defaultfont.C b/src/defaultfont.C index 0c0dc24b..864a757d 100644 --- a/src/defaultfont.C +++ b/src/defaultfont.C @@ -878,10 +878,6 @@ rxvt_font_xft::load (const rxvt_fontprop &prop) XftUnlockFace (f); - d = XftDrawCreate (DISPLAY, DRAWABLE, r->display->visual, r->display->cmap); - if (!d) - return false; - return true; } @@ -896,6 +892,8 @@ rxvt_font_xft::draw (int x, int y, 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 diff --git a/src/init.C b/src/init.C index 42617590..20d4490d 100644 --- a/src/init.C +++ b/src/init.C @@ -808,6 +808,8 @@ rxvt_term::set_locale (const char *locale) #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); diff --git a/src/main.C b/src/main.C index 79a8d0e9..09df4b5d 100644 --- a/src/main.C +++ b/src/main.C @@ -1,4 +1,4 @@ -/*--------------------------------*-C-*---------------------------------* +/*--------------------------------*-C-*---------------------------------*; * File: main.c *----------------------------------------------------------------------* * @@ -267,7 +267,7 @@ rxvt_term::init (int argc, const char *const *argv) Gr_reset (); /* reset graphics */ #endif -#if 1 +#if 0 XSynchronize (display->display, True); #endif @@ -1316,7 +1316,7 @@ rxvt_term::im_cb () #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]; @@ -1357,7 +1357,7 @@ rxvt_term::im_cb () done: #if defined(HAVE_XSETLOCALE) || defined(HAVE_SETLOCALE) if (rs[Rs_imLocale]) - setlocale (LC_CTYPE, locale); + rxvt_set_locale (locale); #endif } diff --git a/src/rxvt.h b/src/rxvt.h index 51a4e745..67356dac 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -821,10 +821,9 @@ enum { 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 { diff --git a/src/rxvtcolor.C b/src/rxvtcolor.C index edd381ec..f02b1c0a 100644 --- a/src/rxvtcolor.C +++ b/src/rxvtcolor.C @@ -341,7 +341,7 @@ rxvt_color::free (rxvt_display *display) #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 }