all repos — fluxbox @ dc9793c90af75fd6e3d3e512abc2167a5544caba

custom fork of the fluxbox windowmanager

Code cleanup

Reorder some includes; remove unused includes
Mathias Gumz akira@fluxbox.org
commit

dc9793c90af75fd6e3d3e512abc2167a5544caba

parent

b16528de87e80dcd1ae9f70c8c76fd8da722d2da

3 files changed, 20 insertions(+), 53 deletions(-)

jump to
M src/FbTk/Font.ccsrc/FbTk/Font.cc

@@ -19,11 +19,13 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -#include "StringUtil.hh" -#include "stringstream.hh" #include "Font.hh" #include "FontImp.hh" +#include "StringUtil.hh" +#include "stringstream.hh" #include "App.hh" +#include "GContext.hh" +#include "XFontImp.hh" // for antialias #ifdef USE_XFT

@@ -35,41 +37,20 @@ #ifdef USE_XMB

#include "XmbFontImp.hh" #endif //USE_XMB -// standard font system -#include "XFontImp.hh" - -#include "GContext.hh" - -#ifndef __USE_GNU -#define __USE_GNU -#endif //__USE_GNU - -#ifdef HAVE_CSTRING - #include <cstring> -#else - #include <string.h> -#endif -#ifdef HAVE_CSTDLIB - #include <cstdlib> -#else - #include <stdlib.h> -#endif +#include <cstring> +#include <cstdlib> #include <list> #include <map> #include <typeinfo> #include <langinfo.h> -#include <cstdio> -#include <errno.h> +#ifdef HAVE_SETLOCALE +#include <locale.h> +#endif //HAVE_SETLOCALE using std::string; using std::map; using std::list; - - -#ifdef HAVE_SETLOCALE -#include <locale.h> -#endif //HAVE_SETLOCALE namespace {

@@ -207,12 +188,13 @@

// Xft and X/Xmb fonts have different defaults // (fixed doesn't really work right with Xft, especially rotated) - // HOWEVER, note that if a Xft-style font is requested (not start with "-"), and - // it turns out to be a bitmapped XFont, then Xft will load it, BUT it does not - // currently (5jan2007) rotate bitmapped fonts (ok-ish), nor adjust the baseline for its - // lack of rotation (not ok: messes up placement). I can't see a neat way around this, - // other than the user re-specifying their font explicitly in XFont form so we don't use the - // Xft backend. + // HOWEVER, note that if a Xft-style font is requested (does not start + // with "-"), and it turns out to be a bitmapped XFont, then Xft will + // load it, BUT it does not currently (2007-01-05) rotate bitmapped + // fonts (ok-ish), nor adjust the baseline for its lack of rotation + // (not ok: messes up placement). I can't see a neat way around this, + // other than the user re-specifying their font explicitly in XFont + // form so we don't use the Xft backend. std::string realname = *name_it;

@@ -304,8 +286,6 @@ m_fontimp->drawText(w, screen, halo_gc.gc(), text, len, x + 1, y - 1, orient);

} m_fontimp->drawText(w, screen, gc, text, len, x, y, orient); - - } }
M src/FbTk/TextTheme.ccsrc/FbTk/TextTheme.cc

@@ -21,7 +21,6 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

// DEALINGS IN THE SOFTWARE. #include "TextTheme.hh" - #include "App.hh" #include <X11/Xlib.h>
M src/FbTk/XmbFontImp.ccsrc/FbTk/XmbFontImp.cc

@@ -31,29 +31,17 @@ #ifdef HAVE_SETLOCALE

#include <locale.h> #endif // HAVE_SETLOCALE -#ifdef HAVE_CSTDIO - #include <cstdio> -#else - #include <stdio.h> -#endif -#ifdef HAVE_CSTDARG - #include <cstdarg> -#else - #include <stdarg.h> -#endif -#ifdef HAVE_CSTRING - #include <cstring> -#else - #include <string.h> -#endif +#include <cstdarg> +#include <cstring> using std::string; namespace { XFontSet createFontSet(const char *fontname, bool& utf8mode) { + Display *display = FbTk::App::instance()->display(); - XFontSet fs; + XFontSet fs = 0; char **missing; const char *constdef = "-"; char *def = const_cast<char *>(constdef);