Build system: CMake is back, managing xft optional.

This commit is contained in:
David Demelier
2011-06-13 14:32:39 +02:00
parent 5d208730cd
commit 9a8fdd37c6
6 changed files with 864 additions and 3306 deletions

View File

@@ -90,6 +90,7 @@ init_font(void)
font.fontset = XCreateFontSet(dpy, "fixed", &misschar, &d, &defstring);
}
XExtentsOfFontSet(font.fontset);
XFontsOfFontSet(font.fontset, &xfs, &names);
font.as = xfs[0]->max_bounds.ascent;

View File

@@ -537,7 +537,9 @@ typedef struct
typedef struct
{
int as, de, width, height;
#ifdef HAVE_XFT
XftFont *font;
#endif /* HAVE_XFT */
XFontSet fontset;
} FontStruct;
typedef struct

View File

@@ -1,3 +1,4 @@
/*
* wmfs.h
* Copyright © 2008, 2009 Martin Duquesnoy <xorg62@gmail.com>
@@ -57,13 +58,12 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#include <X11/Xft/Xft.h>
/* Local headers */
#include "parse.h"
#include "structs.h"
/* Optional dependencies */
#ifdef HAVE_XFT
#include <X11/Xft/Xft.h>
#endif /* HAVE_XFT */
#ifdef HAVE_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif /* HAVE_XINERAMA */
@@ -76,6 +76,10 @@
#include <Imlib2.h>
#endif /* HAVE_IMLIB */
/* Local headers */
#include "parse.h"
#include "structs.h"
/* MACRO */
#define ButtonMask (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask)
#define MouseMask (ButtonMask | PointerMotionMask)