diff -ru ratpoison-1.4.0-beta4/src/bar.c ratpoison-1.4.0-beta4-mod/src/bar.c
--- ratpoison-1.4.0-beta4/src/bar.c	2004-12-08 23:18:11.000000000 -0600
+++ ratpoison-1.4.0-beta4-mod/src/bar.c	2006-01-11 10:23:17.492360000 -0600
@@ -102,11 +102,13 @@
     case CenterGravity:
     case SouthGravity:
       x = s->left + (s->width - width - defaults.bar_border_width * 2) / 2;
+      if(x < s->left) x = s->left;
       break;
     case NorthEastGravity:
     case EastGravity:
     case SouthEastGravity:
       x = s->left + s->width - width - defaults.bar_border_width * 2;
+      if(x < s->left) x = s->left;
       break;
     }
 
@@ -130,12 +132,14 @@
     case WestGravity:
       y = s->top + (s->height - height 
 	   - defaults.bar_border_width * 2) / 2;
+      if(y < s->top) y = s->top;
       break;
     case SouthEastGravity:
     case SouthGravity:
     case SouthWestGravity:
       y = s->top + (s->height - height 
 	   - defaults.bar_border_width * 2);
+      if(y < s->top) y = s->top;
       break;
     }
 
