Mercurial > hg > xemacs-beta
diff src/device-x.c @ 5237:6466bc9ebf15
* console-x-impl.h (DEVICE_X_XFTDRAW): Define, instead of
FRAME_X_FTDRAW.
(struct x_device): Add XftDraw field.
(struct x_frame): Remove XftDraw field.
Move XftDraw from frame to device for improved caching.
* device-x.c (x_delete_device): Free XftDraw here.
* frame-x.c (x_delete_frame): Remove freeing of XftDraw.
* redisplay-xlike-inc.c (XLIKE_output_string): Use
DEVICE_X_XFTDRAW instead of FRAME_X_XFTDRAW when lazily creating
XftDraw structure.
author | Jeff Sparkes <jsparkes@gmail.com> |
---|---|
date | Wed, 23 Jun 2010 08:04:18 -0400 |
parents | 5efbd1253905 |
children | f19e6bc25969 |
line wrap: on
line diff
--- a/src/device-x.c Sun Jun 13 23:54:13 2010 +0900 +++ b/src/device-x.c Wed Jun 23 08:04:18 2010 -0400 @@ -946,6 +946,18 @@ int checking_free; #endif +#ifdef HAVE_XFT + /* If we have an XftDraw structure, we need to free it here. + We can't ever have an XftDraw without a Display, so we are safe + to free it in here, and we avoid too much playing around with the + malloc checking hooks this way. */ + if (DEVICE_X_XFTDRAW (d)) + { + XftDrawDestroy (DEVICE_X_XFTDRAW (d)); + DEVICE_X_XFTDRAW (d) = NULL; + } +#endif + display = DEVICE_X_DISPLAY (d); if (display)