diff -r 759af661093f area.c --- a/area.c Thu Jan 04 11:59:36 2007 +0100 +++ b/area.c Mon Jan 08 10:49:13 2007 +0100 @@ -37,6 +37,7 @@ create_area(View *v, Area *pos, unsigned a->view = v; a->id = id++; a->rect = screen->rect; + a->rect.y = AREA_VIEW_Y; a->rect.height = screen->rect.height - screen->brect.height; a->mode = def.colmode; a->rect.width = w; @@ -109,8 +110,8 @@ place_client(Area *a, Client *c) { x = 0; else x = fr->rect.x / dx; - if(fr->rect.y < 0) - y = 0; + if(fr->rect.y < AREA_VIEW_Y) + y = AREA_VIEW_Y; else y = fr->rect.y / dy; maxx = (fr->rect.x + fr->rect.width) / dx; @@ -146,7 +147,7 @@ place_client(Area *a, Client *c) { f->rect.x = a->rect.x + (random() % (diff ? diff : 1)); } if(fit && (p1.y + f->rect.height < a->rect.y + a->rect.height)) - f->rect.y = p1.y; + f->rect.y = (p1.y < AREA_VIEW_Y) ? AREA_VIEW_Y : p1.y; else { diff = a->rect.height - f->rect.height; f->rect.y = a->rect.y + (random() % (diff ? diff : 1)); diff -r 759af661093f bar.c --- a/bar.c Thu Jan 04 11:59:36 2007 +0100 +++ b/bar.c Mon Jan 08 10:49:13 2007 +0100 @@ -51,7 +51,7 @@ resize_bar(WMScreen *s) { s->brect = s->rect; s->brect.height = labelh(&def.font); - s->brect.y = s->rect.height - s->brect.height; + s->brect.y = WM_BAR_Y; XMoveResizeWindow(blz.dpy, s->barwin, s->brect.x, s->brect.y, s->brect.width, s->brect.height); XSync(blz.dpy, False); draw_bar(s); diff -r 759af661093f config.mk --- a/config.mk Thu Jan 04 11:59:36 2007 +0100 +++ b/config.mk Mon Jan 08 10:49:13 2007 +0100 @@ -3,6 +3,7 @@ CONFVERSION = 3.5 CONFVERSION = 3.5 # Customize below to fit your system +BAR_ON_TOP = 0 # paths PREFIX = /usr/local @@ -17,7 +18,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -L${PREFIX}/lib -lixp -lm # flags -CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" +CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DBAR_ON_TOP=${BAR_ON_TOP} LDFLAGS = ${LIBS} #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" #LDFLAGS = -g ${LIBS} diff -r 759af661093f main.c --- a/main.c Thu Jan 04 11:59:36 2007 +0100 +++ b/main.c Mon Jan 08 10:49:13 2007 +0100 @@ -318,7 +318,7 @@ main(int argc, char *argv[]) { | SubstructureRedirectMask | SubstructureNotifyMask; s->brect = s->rect; s->brect.height = labelh(&def.font); - s->brect.y = s->rect.height - s->brect.height; + s->brect.y = WM_BAR_Y; s->barwin = XCreateWindow(blz.dpy, RootWindow(blz.dpy, blz.screen), s->brect.x, s->brect.y, s->brect.width, s->brect.height, 0, diff -r 759af661093f view.c --- a/view.c Thu Jan 04 11:59:36 2007 +0100 +++ b/view.c Mon Jan 08 10:49:13 2007 +0100 @@ -238,7 +238,7 @@ arrange_view(View *v) { scale_view(v, screen->rect.width); for(a=v->area->next; a; a=a->next) { a->rect.x = xoff; - a->rect.y = 0; + a->rect.y = AREA_VIEW_Y; a->rect.height = screen->rect.height - screen->brect.height; xoff += a->rect.width; arrange_column(a, False); diff -r 759af661093f wmii.h --- a/wmii.h Thu Jan 04 11:59:36 2007 +0100 +++ b/wmii.h Mon Jan 08 16:22:43 2007 +0100 @@ -14,6 +14,14 @@ #define BLITZ_FOCUSCOLORS "#ffffff #335577 #447799" #define BLITZ_SELCOLORS "#444444 #bbbbbb #556088" #define BLITZ_NORMCOLORS "#222222 #eeeeee #666666" + +#if BAR_ON_TOP == 1 +#define WM_BAR_Y 0 +#define AREA_VIEW_Y screen->brect.height +#else +#define WM_BAR_Y s->rect.height - s->brect.height +#define AREA_VIEW_Y 0 +#endif typedef struct Blitz Blitz; typedef enum BlitzAlign BlitzAlign; @@ -376,6 +384,6 @@ extern void update_views(); extern void update_views(); extern unsigned int newcolw_of_view(View *v); -/* wm.c */ +/* main.c */ extern int wmii_error_handler(Display *dpy, XErrorEvent *error); extern int win_proto(Window w);