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
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)
{
- 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
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
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;
}
{
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);
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)