From 6395db433188385b91c87a8831ad0eb970cb5e5e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 17 Mar 2009 17:58:28 +0100 Subject: [PATCH] swindow: change border_width handling It's now outside of the geometry. Signed-off-by: Julien Danjou --- swindow.c | 4 ++-- wibox.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/swindow.c b/swindow.c index 487ad8ebc..446a2162d 100644 --- a/swindow.c +++ b/swindow.c @@ -92,8 +92,8 @@ simplewindow_init(simple_window_t *sw, /* The real protocol window. */ sw->geometries.internal.x = geometry.x; sw->geometries.internal.y = geometry.y; - sw->geometries.internal.width = geometry.width - 2*border_width; - sw->geometries.internal.height = geometry.height - 2*border_width; + sw->geometries.internal.width = geometry.width; + sw->geometries.internal.height = geometry.height; sw->orientation = orientation; sw->ctx.fg = *fg; diff --git a/wibox.c b/wibox.c index 92cef0bd2..a95ae6910 100644 --- a/wibox.c +++ b/wibox.c @@ -372,7 +372,7 @@ wibox_position_update(wibox_t *wibox) switch(wibox->position) { 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.x = area.x + area.width - wingeom.width; switch(wibox->align) @@ -389,7 +389,7 @@ wibox_position_update(wibox_t *wibox) } break; 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.x = area.x; switch(wibox->align) @@ -406,7 +406,7 @@ wibox_position_update(wibox_t *wibox) break; case Bottom: 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.x = area.x; switch(wibox->align) @@ -423,7 +423,7 @@ wibox_position_update(wibox_t *wibox) break; case Top: 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.y = area.y; switch(wibox->align)