awful.wibox: take wibox border into account when updating struts

Function wibox_update_strut would not take the border width into
account when calculating struts. When a wibox border was in use
clients would overlap the wibox. With a border of 1px we loose 1px of
the wibox, but as the wibox border increases it is "pushed" by the
border nearest the screen edge and clients steal more and more space.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Adrian C. (anrxc) 2009-12-30 02:42:42 +01:00 committed by Julien Danjou
parent 6cd4f9d11a
commit 799c94ff48
1 changed files with 4 additions and 4 deletions

View File

@ -87,13 +87,13 @@ local function wibox_update_strut(wibox)
if not wibox.visible then if not wibox.visible then
wibox:struts { left = 0, right = 0, bottom = 0, top = 0 } wibox:struts { left = 0, right = 0, bottom = 0, top = 0 }
elseif wprop.position == "top" then elseif wprop.position == "top" then
wibox:struts { left = 0, right = 0, bottom = 0, top = wibox.height } wibox:struts { left = 0, right = 0, bottom = 0, top = wibox.height + wibox.border_width }
elseif wprop.position == "bottom" then elseif wprop.position == "bottom" then
wibox:struts { left = 0, right = 0, bottom = wibox.height, top = 0 } wibox:struts { left = 0, right = 0, bottom = wibox.height + wibox.border_width, top = 0 }
elseif wprop.position == "left" then elseif wprop.position == "left" then
wibox:struts { left = wibox.width, right = 0, bottom = 0, top = 0 } wibox:struts { left = wibox.width + wibox.border_width, right = 0, bottom = 0, top = 0 }
elseif wprop.position == "right" then elseif wprop.position == "right" then
wibox:struts { left = 0, right = wibox.width, bottom = 0, top = 0 } wibox:struts { left = 0, right = wibox.width + wibox.border_width, bottom = 0, top = 0 }
end end
break break
end end