swindow: change border_width handling

It's now outside of the geometry.

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-03-17 17:58:28 +01:00
parent 5ee16fb72d
commit 6395db4331
2 changed files with 6 additions and 6 deletions

View File

@ -92,8 +92,8 @@ simplewindow_init(simple_window_t *sw,
/* The real protocol window. */ /* The real protocol window. */
sw->geometries.internal.x = geometry.x; sw->geometries.internal.x = geometry.x;
sw->geometries.internal.y = geometry.y; sw->geometries.internal.y = geometry.y;
sw->geometries.internal.width = geometry.width - 2*border_width; sw->geometries.internal.width = geometry.width;
sw->geometries.internal.height = geometry.height - 2*border_width; sw->geometries.internal.height = geometry.height;
sw->orientation = orientation; sw->orientation = orientation;
sw->ctx.fg = *fg; sw->ctx.fg = *fg;

View File

@ -372,7 +372,7 @@ wibox_position_update(wibox_t *wibox)
switch(wibox->position) switch(wibox->position)
{ {
case Right: case Right:
wingeom.height = area.height; wingeom.height = area.height - 2 * wibox->sw.border.width;
wingeom.width = wibox->sw.geometry.width > 0 ? wibox->sw.geometry.width : 1.5 * globalconf.font->height; wingeom.width = wibox->sw.geometry.width > 0 ? wibox->sw.geometry.width : 1.5 * globalconf.font->height;
wingeom.x = area.x + area.width - wingeom.width; wingeom.x = area.x + area.width - wingeom.width;
switch(wibox->align) switch(wibox->align)
@ -389,7 +389,7 @@ wibox_position_update(wibox_t *wibox)
} }
break; break;
case Left: case Left:
wingeom.height = area.height; wingeom.height = area.height - 2 * wibox->sw.border.width;
wingeom.width = wibox->sw.geometry.width > 0 ? wibox->sw.geometry.width : 1.5 * globalconf.font->height; wingeom.width = wibox->sw.geometry.width > 0 ? wibox->sw.geometry.width : 1.5 * globalconf.font->height;
wingeom.x = area.x; wingeom.x = area.x;
switch(wibox->align) switch(wibox->align)
@ -406,7 +406,7 @@ wibox_position_update(wibox_t *wibox)
break; break;
case Bottom: case Bottom:
wingeom.height = wibox->sw.geometry.height > 0 ? wibox->sw.geometry.height : 1.5 * globalconf.font->height; wingeom.height = wibox->sw.geometry.height > 0 ? wibox->sw.geometry.height : 1.5 * globalconf.font->height;
wingeom.width = area.width; wingeom.width = area.width - 2 * wibox->sw.border.width;
wingeom.y = (area.y + area.height) - wingeom.height; wingeom.y = (area.y + area.height) - wingeom.height;
wingeom.x = area.x; wingeom.x = area.x;
switch(wibox->align) switch(wibox->align)
@ -423,7 +423,7 @@ wibox_position_update(wibox_t *wibox)
break; break;
case Top: case Top:
wingeom.height = wibox->sw.geometry.height > 0 ? wibox->sw.geometry.height : 1.5 * globalconf.font->height; wingeom.height = wibox->sw.geometry.height > 0 ? wibox->sw.geometry.height : 1.5 * globalconf.font->height;
wingeom.width = area.width; wingeom.width = area.width - 2 * wibox->sw.border.width;
wingeom.x = area.x; wingeom.x = area.x;
wingeom.y = area.y; wingeom.y = area.y;
switch(wibox->align) switch(wibox->align)