diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wm/area.c wmii-20060501-rc1-prypiat/cmd/wm/area.c
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wm/area.c	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wm/area.c	Wed May  3 22:01:12 2006
***************
*** 39,46 ****
  	for(i = 1; i < v->area.size; i++) {
  		Area *b = v->area.data[i];
  		b->rect.x = xoff;
! 		b->rect.y = 0;
! 		b->rect.height = rect.height - brect.height;
  		if(b->rect.width < MIN_COLWIDTH)
  			b->rect.width = MIN_COLWIDTH;
  		else if((wdiff = b->rect.x + b->rect.width - (rect.width - w) + (v->area.size - 1 - i) * MIN_COLWIDTH) > 0)
--- 39,46 ----
  	for(i = 1; i < v->area.size; i++) {
  		Area *b = v->area.data[i];
  		b->rect.x = xoff;
! 		b->rect.y = AREA_Y;
! 		b->rect.height = AREA_H;
  		if(b->rect.width < MIN_COLWIDTH)
  			b->rect.width = MIN_COLWIDTH;
  		else if((wdiff = b->rect.x + b->rect.width - (rect.width - w) + (v->area.size - 1 - i) * MIN_COLWIDTH) > 0)
***************
*** 51,56 ****
--- 51,57 ----
  	a->view = v;
  	a->id = id++;
  	a->rect = rect;
+ 	a->rect.y = AREA_Y;
  	a->rect.height = rect.height - brect.height;
  	a->mode = def.colmode;
  	a->rect.width = w;
***************
*** 196,203 ****
  			x = 0;
  		else
  			x = fr->rect.x / dx;
! 		if(fr->rect.y < 0)
! 			y = 0;
  		else
  			y = fr->rect.y / dy;
  		maxx = (fr->rect.x + fr->rect.width) / dx;
--- 197,204 ----
  			x = 0;
  		else
  			x = fr->rect.x / dx;
! 		if(fr->rect.y < AREA_Y)
! 			y = AREA_Y;
  		else
  			y = fr->rect.y / dy;
  		maxx = (fr->rect.x + fr->rect.width) / dx;
diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wm/bar.c wmii-20060501-rc1-prypiat/cmd/wm/bar.c
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wm/bar.c	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wm/bar.c	Wed May  3 22:11:08 2006
***************
*** 74,80 ****
  	unsigned int i, j;
  	brect = rect;
  	brect.height = height_of_bar();
! 	brect.y = rect.height - brect.height;
  	XMoveResizeWindow(dpy, barwin, brect.x, brect.y, brect.width, brect.height);
  	XSync(dpy, False);
  	XFreePixmap(dpy, barpmap);
--- 74,80 ----
  	unsigned int i, j;
  	brect = rect;
  	brect.height = height_of_bar();
! 	brect.y = BAR_Y;
  	XMoveResizeWindow(dpy, barwin, brect.x, brect.y, brect.width, brect.height);
  	XSync(dpy, False);
  	XFreePixmap(dpy, barpmap);
diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wm/view.c wmii-20060501-rc1-prypiat/cmd/wm/view.c
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wm/view.c	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wm/view.c	Wed May  3 22:02:01 2006
***************
*** 299,305 ****
  	for(i = 1; i < v->area.size; i++) {
  		Area *a = v->area.data[i];
  		a->rect.x = xoff;
! 		a->rect.y = 0;
  		a->rect.height = rect.height - brect.height;
  		if(a->rect.width < MIN_COLWIDTH)
  			a->rect.width = MIN_COLWIDTH;
--- 299,305 ----
  	for(i = 1; i < v->area.size; i++) {
  		Area *a = v->area.data[i];
  		a->rect.x = xoff;
! 		a->rect.y = VIEW_Y;
  		a->rect.height = rect.height - brect.height;
  		if(a->rect.width < MIN_COLWIDTH)
  			a->rect.width = MIN_COLWIDTH;
diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wm/wm.c wmii-20060501-rc1-prypiat/cmd/wm/wm.c
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wm/wm.c	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wm/wm.c	Wed May  3 22:34:00 2006
***************
*** 321,327 ****
  
  	brect = rect;
  	brect.height = height_of_bar();
! 	brect.y = rect.height - brect.height;
  	barwin = XCreateWindow(dpy, RootWindow(dpy, screen), brect.x, brect.y,
  			brect.width, brect.height, 0, DefaultDepth(dpy, screen),
  			CopyFromParent, DefaultVisual(dpy, screen),
--- 321,327 ----
  
  	brect = rect;
  	brect.height = height_of_bar();
! 	brect.y = WM_Y;
  	barwin = XCreateWindow(dpy, RootWindow(dpy, screen), brect.x, brect.y,
  			brect.width, brect.height, 0, DefaultDepth(dpy, screen),
  			CopyFromParent, DefaultVisual(dpy, screen),
diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wm/wm.h wmii-20060501-rc1-prypiat/cmd/wm/wm.h
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wm/wm.h	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wm/wm.h	Wed May  3 22:33:52 2006
***************
*** 10,15 ****
--- 10,29 ----
  #include <ixp.h>
  #include <blitz.h>
  
+ #if BAR_ON_TOP == 1
+ #define WM_Y     brect.height
+ #define BAR_Y    0
+ #define VIEW_Y   brect.height
+ #define AREA_Y   brect.height
+ #define AREA_H   rect.height
+ #else
+ #define WM_Y     rect.height - brect.height
+ #define BAR_Y    rect.height - brect.height
+ #define VIEW_Y   0
+ #define AREA_Y   0
+ #define AREA_H   rect.height - brect.height
+ #endif
+ 
  /* WM atoms */
  enum {
  	WMState,
diff -Narc wmii-20060501-rc1-prypiat.ORIG/cmd/wmiimenu.c wmii-20060501-rc1-prypiat/cmd/wmiimenu.c
*** wmii-20060501-rc1-prypiat.ORIG/cmd/wmiimenu.c	Mon May  1 23:58:03 2006
--- wmii-20060501-rc1-prypiat/cmd/wmiimenu.c	Wed May  3 22:27:57 2006
***************
*** 20,25 ****
--- 20,31 ----
  #include <blitz.h>
  #include <cext.h>
  
+ #if BAR_ON_TOP == 1
+ #define MENU_Y 0
+ #else
+ #define MENU_Y DisplayHeight(dpy, screen) - mrect.height
+ #endif
+ 
  VECTOR(ItemVector, char *);
  static Bool done = False;
  static int ret = 0;
***************
*** 359,365 ****
  
  	mrect.width = DisplayWidth(dpy, screen);
  	mrect.height = draw.font.ascent + draw.font.descent + 4;
! 	mrect.y = DisplayHeight(dpy, screen) - mrect.height;
  	mrect.x = 0;
  
  	win = XCreateWindow(dpy, RootWindow(dpy, screen), mrect.x, mrect.y,
--- 365,371 ----
  
  	mrect.width = DisplayWidth(dpy, screen);
  	mrect.height = draw.font.ascent + draw.font.descent + 4;
! 	mrect.y = MENU_Y;
  	mrect.x = 0;
  
  	win = XCreateWindow(dpy, RootWindow(dpy, screen), mrect.x, mrect.y,
diff -Narc wmii-20060501-rc1-prypiat.ORIG/config.mk wmii-20060501-rc1-prypiat/config.mk
*** wmii-20060501-rc1-prypiat.ORIG/config.mk	Mon May  1 23:58:02 2006
--- wmii-20060501-rc1-prypiat/config.mk	Wed May  3 22:26:47 2006
***************
*** 9,21 ****
  X11LIB = /usr/X11R6/lib
  
  VERSION = 20060501-rc1-prypiat
  
  # includes and libs
  LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11
  
  # Linux/BSD
  CFLAGS = -g -Wall -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \
! 	-DVERSION=\"${VERSION}\"
  LDFLAGS = -g ${LIBS}
  
  # Solaris
--- 9,22 ----
  X11LIB = /usr/X11R6/lib
  
  VERSION = 20060501-rc1-prypiat
+ BAR_ON_TOP = 0
  
  # includes and libs
  LIBS = -L${PREFIX}/lib -L/usr/lib -lc -L${X11LIB} -lX11
  
  # Linux/BSD
  CFLAGS = -g -Wall -I. -I${PREFIX}/include -I/usr/include -I${X11INC} \
! 	-DVERSION=\"${VERSION}\" -DBAR_ON_TOP=${BAR_ON_TOP}
  LDFLAGS = -g ${LIBS}
  
  # Solaris
