aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2013-06-22 07:45:48 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2013-06-22 07:45:48 (GMT)
commit2efd4b823082efb45cb351c7185d510ccb1dd32a (patch)
tree41873ea1b9beb88fb412ac89a6777b3aabfff75e
parent34656ac6226af7866590fb02d75dbb87de2d5496 (diff)
downloadfluxbox-2efd4b823082efb45cb351c7185d510ccb1dd32a.zip
fluxbox-2efd4b823082efb45cb351c7185d510ccb1dd32a.tar.bz2
cosmetics
-rw-r--r--src/FbTk/Font.cc5
-rw-r--r--src/FbTk/XftFontImp.cc12
2 files changed, 8 insertions, 9 deletions
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc
index 544ddc2..c855d10 100644
--- a/src/FbTk/Font.cc
+++ b/src/FbTk/Font.cc
@@ -91,10 +91,11 @@ typedef FontCache::iterator FontCacheIt;
91 91
92 92
93void resetEffects(FbTk::Font& font) { 93void resetEffects(FbTk::Font& font) {
94 int nr_scr = DefaultScreen(FbTk::App::instance()->display());
94 font.setHalo(false); 95 font.setHalo(false);
95 font.setHaloColor(FbTk::Color("white", DefaultScreen(FbTk::App::instance()->display()))); 96 font.setHaloColor(FbTk::Color("white", nr_scr));
96 font.setShadow(false); 97 font.setShadow(false);
97 font.setShadowColor(FbTk::Color("black", DefaultScreen(FbTk::App::instance()->display()))); 98 font.setShadowColor(FbTk::Color("black", nr_scr));
98 font.setShadowOffY(2); 99 font.setShadowOffY(2);
99 font.setShadowOffX(2); 100 font.setShadowOffX(2);
100} 101}
diff --git a/src/FbTk/XftFontImp.cc b/src/FbTk/XftFontImp.cc
index 9e57349..86eb9f8 100644
--- a/src/FbTk/XftFontImp.cc
+++ b/src/FbTk/XftFontImp.cc
@@ -62,12 +62,12 @@ bool XftFontImp::load(const std::string &name) {
62 if (newxftfont == 0) 62 if (newxftfont == 0)
63 return false; 63 return false;
64 } 64 }
65 65
66 // destroy all old fonts and set new 66 // destroy all old fonts and set new
67 for (int r = ROT0; r <= ROT270; r++) { 67 for (int r = ROT0; r <= ROT270; r++) {
68 m_xftfonts_loaded[r] = false; 68 m_xftfonts_loaded[r] = false;
69 if (m_xftfonts[r] != 0) { 69 if (m_xftfonts[r] != 0) {
70 XftFontClose(App::instance()->display(), m_xftfonts[r]); 70 XftFontClose(disp, m_xftfonts[r]);
71 m_xftfonts[r] = 0; 71 m_xftfonts[r] = 0;
72 } 72 }
73 } 73 }
@@ -176,12 +176,10 @@ unsigned int XftFontImp::textWidth(const char* text, unsigned int len) const {
176 176
177#ifdef HAVE_XFT_UTF8_STRING 177#ifdef HAVE_XFT_UTF8_STRING
178 if (m_utf8mode) { 178 if (m_utf8mode) {
179 XftTextExtentsUtf8(disp, 179 XftTextExtentsUtf8(disp, font, (XftChar8 *)text, len, &ginfo);
180 font, 180 if (ginfo.xOff != 0) {
181 (XftChar8 *)text, len,
182 &ginfo);
183 if (ginfo.xOff != 0)
184 return ginfo.xOff; 181 return ginfo.xOff;
182 }
185 183
186 // the utf8 failed, try normal extents 184 // the utf8 failed, try normal extents
187 } 185 }