projects
/
monky
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation without --enable-argb
[monky]
/
src
/
fonts.c
diff --git
a/src/fonts.c
b/src/fonts.c
index
a31e563
..
6067bf2
100644
(file)
--- a/
src/fonts.c
+++ b/
src/fonts.c
@@
-1,4
+1,5
@@
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
+ * vim: ts=4 sw=4 noet ai cindent syntax=c
*
* Conky, a system monitor, based on torsmo
*
*
* Conky, a system monitor, based on torsmo
*
@@
-9,7
+10,7
@@
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
- * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
+ * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
* (see AUTHORS)
* All rights reserved.
*
* (see AUTHORS)
* All rights reserved.
*
@@
-25,8
+26,6
@@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- * vim: ts=4 sw=4 noet ai cindent syntax=c
- *
*/
#include "conky.h"
#include "fonts.h"
*/
#include "conky.h"
#include "fonts.h"
@@
-59,7
+58,7
@@
void setup_fonts(void)
window.xftdraw = 0;
}
window.xftdraw = XftDrawCreate(display, window.drawable,
window.xftdraw = 0;
}
window.xftdraw = XftDrawCreate(display, window.drawable,
- DefaultVisual(display, screen), DefaultColormap(display, screen));
+ window.visual, window.colourmap);
}
#endif /* XFT */
set_font();
}
#endif /* XFT */
set_font();
@@
-136,7
+135,13
@@
void free_fonts(void)
for (i = 0; i <= font_count; i++) {
#ifdef XFT
if (use_xft) {
for (i = 0; i <= font_count; i++) {
#ifdef XFT
if (use_xft) {
- XftFontClose(display, fonts[i].xftfont);
+ /*
+ * Do we not need to close fonts with Xft? Unsure. Not freeing the
+ * fonts seems to incur a slight memory leak, but it also prevents
+ * a crash.
+ *
+ * XftFontClose(display, fonts[i].xftfont);
+ */
fonts[i].xftfont = 0;
} else
#endif /* XFT */
fonts[i].xftfont = 0;
} else
#endif /* XFT */