From: pcg Date: Fri, 20 Feb 2004 22:27:23 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=f73ca70cc92a1a013cfda0116fb793c4c1f5e0fd;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/defaultfont.C b/src/defaultfont.C index 09d8e288..0c0dc24b 100644 --- a/src/defaultfont.C +++ b/src/defaultfont.C @@ -762,17 +762,17 @@ protected: void rxvt_font_xft::clear () { - if (f) - { - XftFontClose (DISPLAY, f); - f = 0; - } - if (d) { XftDrawDestroy (d); d = 0; } + + if (f) + { + XftFontClose (DISPLAY, f); + f = 0; + } } rxvt_fontprop @@ -878,6 +878,10 @@ 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; } @@ -892,9 +896,6 @@ rxvt_font_xft::draw (int x, int y, const text_t *text, int len, int fg, int bg) { - if (!d) - 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/main.C b/src/main.C index c3c7e87d..66bc53af 100644 --- a/src/main.C +++ b/src/main.C @@ -108,15 +108,6 @@ rxvt_term::~rxvt_term () if (cmd_fd >= 0) close (cmd_fd); - scr_release (); - - free (env_windowid); - free (env_display); - free (env_term); - free (env_colorfgbg); - free (locale); - free (codeset); - #ifndef NO_SETOWNER_TTYDEV privileged_ttydev (RESTORE); #endif @@ -124,13 +115,27 @@ rxvt_term::~rxvt_term () privileged_utmp (RESTORE); #endif + delete TermWin.fontset; + + if (display) + if (TermWin.parent[0]) + XDestroyWindow (display->display, TermWin.parent[0]); + // TODO: free pixcolours, colours should become part of rxvt_display delete PixColors; - delete TermWin.fontset; displays.put (display); + scr_release (); + + free (env_windowid); + free (env_display); + free (env_term); + free (env_colorfgbg); + free (locale); + free (codeset); + delete envv; delete argv; } @@ -140,13 +145,9 @@ rxvt_term::destroy () { if (display) { - if (TermWin.parent[0]) - XDestroyWindow (display->display, TermWin.parent[0]); - rootwin_ev.stop (display); termwin_ev.stop (display); vt_ev.stop (display); - #ifdef USE_XIM im_destroy (); im_ev.stop (display); @@ -266,11 +267,9 @@ rxvt_term::init (int argc, const char *const *argv) Gr_reset (); /* reset graphics */ #endif -#if 0 -#ifdef DEBUG_X +#if 1 XSynchronize (display->display, True); #endif -#endif #ifdef HAVE_SCROLLBARS if (Options & Opt_scrollBar)