secure macros def.
Signed-off-by: Perrin "kAworu" Alexandre <kaworu(a)kaworu,ch>
This commit is contained in:
committed by
Marc Lagrange
parent
9df3a89490
commit
d789c6d0f2
26
src/wmfs.h
26
src/wmfs.h
@@ -61,27 +61,29 @@
|
|||||||
#define MouseMask (ButtonMask | PointerMotionMask)
|
#define MouseMask (ButtonMask | PointerMotionMask)
|
||||||
#define KeyMask (KeyPressMask | KeyReleaseMask)
|
#define KeyMask (KeyPressMask | KeyReleaseMask)
|
||||||
|
|
||||||
#define CWIN(win, parent, x, y, w, h, b, mask, col, at) \
|
#define CWIN(win, parent, x, y, w, h, b, mask, col, at) \
|
||||||
win = XCreateWindow(dpy, parent, x, y, w, h, b, CopyFromParent, \
|
do { \
|
||||||
InputOutput, CopyFromParent, mask, at); \
|
win = XCreateWindow(dpy, (parent), (x), (y), (w), (h), (b), CopyFromParent, \
|
||||||
XSetWindowBackground(dpy, win, col);
|
InputOutput, CopyFromParent, (mask), (at)); \
|
||||||
|
XSetWindowBackground(dpy, win, (col)); \
|
||||||
|
} while (/*CONSTCOND*/0)
|
||||||
|
|
||||||
#define SCREEN DefaultScreen(dpy)
|
#define SCREEN DefaultScreen(dpy)
|
||||||
#define ROOT RootWindow(dpy, SCREEN)
|
#define ROOT RootWindow(dpy, SCREEN)
|
||||||
#define MAXH DisplayHeight(dpy, DefaultScreen(dpy))
|
#define MAXH DisplayHeight(dpy, DefaultScreen(dpy))
|
||||||
#define MAXW DisplayWidth(dpy, DefaultScreen(dpy))
|
#define MAXW DisplayWidth(dpy, DefaultScreen(dpy))
|
||||||
#define ATOM(a) XInternAtom(dpy, a, False)
|
#define ATOM(a) XInternAtom(dpy, (a), False)
|
||||||
#define INFOBARH font->height * 1.5
|
#define INFOBARH (font->height * 1.5)
|
||||||
#define SHADH 1
|
#define SHADH 1
|
||||||
#define SHADC 0x000000 /* 'Cause i don't know how darken a color yet */
|
#define SHADC 0x000000 /* 'Cause i don't know how darken a color yet */
|
||||||
#define BORDH conf.client.borderheight
|
#define BORDH conf.client.borderheight
|
||||||
#define TBARH conf.titlebar.height
|
#define TBARH conf.titlebar.height
|
||||||
#define FRAMEW(w) w + BORDH * 2
|
#define FRAMEW(w) ((w) + BORDH * 2)
|
||||||
#define FRAMEH(h) h + (BORDH * 2) + TBARH
|
#define FRAMEH(h) ((h) + (BORDH * 2) + TBARH)
|
||||||
#define RESHW 5 * BORDH
|
#define RESHW (5 * BORDH)
|
||||||
#define CHECK(x) if(!x) return
|
#define CHECK(x) if(!(x)) return
|
||||||
#define LEN(x) (sizeof(x) / sizeof(x[0]))
|
#define LEN(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
#define deb(p) fprintf(stderr, "debug: %d\n", p)
|
#define deb(p) fprintf(stderr, "debug: %d\n", (p))
|
||||||
#define PAD 14
|
#define PAD 14
|
||||||
|
|
||||||
/* barwin.c */
|
/* barwin.c */
|
||||||
|
|||||||
Reference in New Issue
Block a user